簡體   English   中英

Node.js服務器未運行

[英]Nodejs server not running

當我嘗試通過命令提示符啟動服務器時,這是我得到的錯誤:

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

上面的調試日志是:

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 ]

當天早些時候服務器工作正常。我無法在此調試日志中了解確切的問題。 您的幫助將不勝感激。

通過讀取錯誤,您似乎沒有安裝babel節點工具。 我用谷歌搜索,看起來您可以從命令提示符下執行此操作:npm install -g babel-cli。

編輯清晰

這些行似乎發生了幾次:

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  

在我看來,npm試圖加載babel-node工具,但是在尋找時卻找到了null。

資源

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM