Reputation: 31
I made a little project using node.js to do a few things with Discord. It worked when I ran it locally with node server.js
and npm start
. I decided to put my project online to see if a certain feature worked. When I uploaded it, the main javascript file (server.js) that starts everything wasn't found.
The error in all it's glory:
module.js:472
throw err;
^
Error: Cannot find module '/var/lib/openshift/583e028e2d52714d2500041/approot/runtime/repo/server.js'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:535:3
Package.json:
{
"name": "app",
"version": "0.0.1",
"description": "test",
"scripts": {
"start": "node --use_strict server.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"main": "server.js",
"keywords": [
"discord",
],
"author": "kert",
"license": "ISC",
"dependencies": {
"express": "^4.14.0",
"discord.js": "7.0.0"
},
"engines" : {
"node" : "6.9.1"
}
}
Structure of files:
Discord
└─── .git
└─── node_modules
└─── rbservers <-nothing is used in this folder
└─── app.js
└─── package.json
└─── server.js
If anyone can point out what stupid thing I'm forgetting, pray tell.
My cartridge on OpenShift is the 'Node.js Auto-Updating' one.
Upvotes: 0
Views: 786
Reputation: 31
Apparently, git wasn't staging/committing all the files in order for them to be pushed. I'll have to look around on how to fix this.
Ugh.
Upvotes: 1