简体   繁体   English

Node.js服务器未运行

[英]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. 通过读取错误,您似乎没有安装babel节点工具。 I googled it, looks like you can do this from the command prompt: npm install -g babel-cli. 我用谷歌搜索,看起来您可以从命令提示符下执行此操作: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. 在我看来,npm试图加载babel-node工具,但是在寻找时却找到了null。

source 资源

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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