简体   繁体   中英

Nodejs server not running

When I try to start the server through command prompt here is the error that I get:

npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program
Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! web@0.0.0 start: `babel-node tools/run start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the web@0.0.0 start script 'babel-node tools/r
un start'.
npm ERR! Make sure you have the latest version of node.js and npm
 installed.
npm ERR! If you do, this is most likely a problem with the web pa
ckage,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node tools/run start
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs web
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls web
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\Rohan-PC\Desktop\main\npm-debug.log

The debug log for the above is:

Files\nodejs\node_modules\npm\bin\node-gyp-bin;C:\Users\Rohan-PC\Desktop\main\node_modules\.bin;C:\Program Files (x86)\Google\Chrome\Application;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin;C:\Program Files\Git\cmd;C:\Users\Rohan-PC\AppData\Local\Microsoft\WindowsApps;C:\Users\Rohan-PC\AppData\Roaming\npm;C:\Users\Rohan-PC\AppData\Local\Yarn\bin
10 verbose lifecycle web@0.0.0~start: CWD: C:\Users\Rohan-PC\Desktop\main
11 silly lifecycle web@0.0.0~start: Args: [ '/d /s /c', 'babel-node tools/run start' ]
12 silly lifecycle web@0.0.0~start: Returned: code: 1  signal: null
13 info lifecycle web@0.0.0~start: Failed to exec start script
14 verbose stack Error: web@0.0.0 start: `babel-node tools/run start`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:255:16)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at EventEmitter.emit (events.js:191:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:40:14)
14 verbose stack     at emitTwo (events.js:106:13)
14 verbose stack     at ChildProcess.emit (events.js:191:7)
14 verbose stack     at maybeClose (internal/child_process.js:891:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
15 verbose pkgid web@0.0.0
16 verbose cwd C:\Users\Rohan-PC\Desktop\main
17 error Windows_NT 10.0.14393
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v6.11.2
20 error npm  v3.10.10
21 error code ELIFECYCLE
22 error web@0.0.0 start: `babel-node tools/run start`
22 error Exit status 1
23 error Failed at the web@0.0.0 start script 'babel-node tools/run start'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the web package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     babel-node tools/run start
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs web
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls web
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]

The server was working fine earlier in the day.I am not able to understand the exact problem in this debug log. Your help would be appreciated.

By reading the error, looks like you don't have babel node tools installed. I googled it, looks like you can do this from the command prompt: npm install -g babel-cli.

edit for clarity

it looked like these lines happened several times:

10 verbose lifecycle web@0.0.0~start: CWD: C:\Users\Rohan-PC\Desktop\main  
11 silly lifecycle web@0.0.0~start: Args: [ '/d /s /c', 'babel-node tools/run start' ]  
12 silly lifecycle web@0.0.0~start: Returned: code: 1  signal: null  

To me that looked like npm was trying to load babel-node tools, but finding null when it looked for it.

source

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM