我查看了Stack Overflow,并在发布之前进行了一些Google搜索。
我重新安装了Win10。我安装了Node.js(v8.12.0)和npm(v6.4.1)。我遵循了mean.io安装命令:
$ git clone https://github.com/linnovate/mean.git
$ cd mean
$ npm install && npm start
我收到了几个错误输出(将在下面发布)。然后,我进入http://mean.io/2017/10/31/getting-started-mean-io/,并意识到我需要安装MongoDB。我使用以下https://www.mongodb.com/download-center#community重新启动计算机,但仍然具有相同的输出:
> mean@0.0.0 start C:\Users\reese\mean
> concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'
['SERVER] 'nodemo' is not recognized as an internal or external command,
['SERVER] operable program or batch file.
[BUILD'] 'server'' is not recognized as an internal or external command,
[BUILD'] operable program or batch file.
[] 'n' is not recognized as an internal or external command,
[] operable program or batch file.
[] 'build' is not recognized as an internal or external command,
[] operable program or batch file.
[] build exited with code 1
[] n exited with code 1
[BUILD'] server' exited with code 1
['SERVER] nodemo exited with code 1
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! mean@0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the mean@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\reese\AppData\Roaming\npm-cache\_logs\2018-10-02T01_13_58_380Z-debug.log
如有必要,我可以共享完整的debug.log。
编辑:下面是完整日志
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm@6.4.1
3 info using node@v8.12.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle mean@0.0.0~prestart: mean@0.0.0
6 info lifecycle mean@0.0.0~start: mean@0.0.0
7 verbose lifecycle mean@0.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle mean@0.0.0~start: PATH: C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin;C:\Users\reese\mean\node_modules\.bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\reese\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\reese\AppData\Local\Programs\Python\Python37-32\;C:\Users\reese\AppData\Local\Microsoft\WindowsApps;C:\Users\reese\AppData\Roaming\npm
9 verbose lifecycle mean@0.0.0~start: CWD: C:\Users\reese\mean
10 silly lifecycle mean@0.0.0~start: Args: [ '/d /s /c',
10 silly lifecycle 'concurrently -c \'yellow.bold,green.bold\' -n \'SERVER,BUILD\' \'nodemon server\' \'ng build --watch\'' ]
11 silly lifecycle mean@0.0.0~start: Returned: code: 1 signal: null
12 info lifecycle mean@0.0.0~start: Failed to exec start script
13 verbose stack Error: mean@0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\index.js:301:16)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at EventEmitter.emit (events.js:214:7)
13 verbose stack at ChildProcess.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\lib\spawn.js:55:14)
13 verbose stack at emitTwo (events.js:126:13)
13 verbose stack at ChildProcess.emit (events.js:214:7)
13 verbose stack at maybeClose (internal/child_process.js:915:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
14 verbose pkgid mean@0.0.0
15 verbose cwd C:\Users\reese\mean
16 verbose Windows_NT 10.0.17134
17 verbose argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
18 verbose node v8.12.0
19 verbose npm v6.4.1
20 error code ELIFECYCLE
21 error errno 1
22 error mean@0.0.0 start: `concurrently -c 'yellow.bold,green.bold' -n 'SERVER,BUILD' 'nodemon server' 'ng build --watch'`
22 error Exit status 1
23 error Failed at the mean@0.0.0 start script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]