Reputation: 1148
I have a node.js with express azure project that I created through visual studio 2015 and it published on Azure with no problem running from vs with no issue as well. When I try to run it through the npm command line I got an error that it can't start! I wonder if there's a configuration or any command arguments to be added to make npm able to run it.
The error
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Administrator\\A
ppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.0.0
npm ERR! npm v4.2.0
npm ERR! missing script: start
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache\_logs\2018-01-11T1
4_24_22_454Z-debug.log
Upvotes: 0
Views: 325
Reputation: 10224
npm start
defaults to node server.js
if start script not defined in package.json
doc : https://docs.npmjs.com/misc/scripts#default-values
If your main file is not called server.js, try running node yourmain.js
or adding a start entry in your package.json with "scripts": { "start": "node yourmain.js" }
Upvotes: 1