npm start报错,请问老师这个怎么处理?

来源:2-2 环境搭建下

慕斯卡4579358

2018-08-21

0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/Cellar/node/8.5.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'start' ]
2 info using npm@6.1.0
3 info using node@v8.5.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle safety-code@1.0.0~prestart: safety-code@1.0.0
6 info lifecycle safety-code@1.0.0~start: safety-code@1.0.0
7 verbose lifecycle safety-code@1.0.0~start: unsafe-perm in lifecycle true
8 verbose lifecycle safety-code@1.0.0~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Library/WebServer/Documents/private/security/coding-104/node_modules/.bin:/usr/local/opt/curl/bin:/usr/local/sbin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/bin/php:/usr/local/go/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands
9 verbose lifecycle safety-code@1.0.0~start: CWD: /Library/WebServer/Documents/private/security/coding-104
10 silly lifecycle safety-code@1.0.0~start: Args: [ '-c', 'node server.js' ]
11 silly lifecycle safety-code@1.0.0~start: Returned: code: 1  signal: null
12 info lifecycle safety-code@1.0.0~start: Failed to exec start script
13 verbose stack Error: safety-code@1.0.0 start: `node server.js`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at EventEmitter.emit (events.js:213:7)
13 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at emitTwo (events.js:125:13)
13 verbose stack     at ChildProcess.emit (events.js:213:7)
13 verbose stack     at maybeClose (internal/child_process.js:927:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
14 verbose pkgid safety-code@1.0.0
15 verbose cwd /Library/WebServer/Documents/private/security/coding-104
16 verbose Darwin 15.4.0
17 verbose argv "/usr/local/Cellar/node/8.5.0/bin/node" "/usr/local/bin/npm" "start"
18 verbose node v8.5.0
19 verbose npm  v6.1.0
20 error code ELIFECYCLE
21 error errno 1
22 error safety-code@1.0.0 start: `node server.js`
22 error Exit status 1
23 error Failed at the safety-code@1.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 ]


写回答

1回答

TooooBug

2018-09-03

没看出来报的什么错误,直接使用node server.js的话会报错吗?另外你的环境是怎么样的?
0
2
TooooBug
回复
qq_阿斯蒂芬_0
好的……默认大家会有一点点node的基础,所以没有写这个……
2019-09-04
共2条回复

腾讯大牛亲授 Web前后端漏洞分析与防御技巧

提高每一行代码安全系数,突破前后端开发Web安全弱项

1186 学习 · 112 问题

查看课程