I have a node application that runs locally and when deploying to Nodejitsu via jitsu deploy, the CLI reports a successful deployment. However, when actually logging in to look at the application via the web based interface and attempting to activate the snapshot, the start fails with the following error:-
err Wed, 05 Nov 2014 14:10:37 GMT
err Wed, 05 Nov 2014 14:10:37 GMT module.js:340
err Wed, 05 Nov 2014 14:10:37 GMT throw err;
err Wed, 05 Nov 2014 14:10:37 GMT Error: Cannot find module '/opt/run/snapshot/package/js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:906:3
err Wed, 05 Nov 2014 14:10:37 GMT ^
The trouble I am having, is the vagueness of the error. What is '/opt/run/snapshot/package/js'? Is there a way of getting more detail out of Nodejitsu so I can see what maybe causing the problem? Is this something anyone else has had?
I can return to this question with more information if requested.
Help, as always, appreciated.
I solved this. The problem was in my
packages.jsonI had the following:-jsis of course not recognised by Nodejitsu on run. I found, by changing it to:-I had no problems.
A note to future Nodejitsu deployers,
postinstallruns locally -- not on the server; therefore removebower_componentsfrom your.gitignoreif you need bower components on nodejitsu.Hope this helps any adventurers who wander by.