nuxt运行项目报错 “Error: spawn pm2 ENOENT”

发布于 2022-09-11 21:13:34 字数 2327 浏览 19 评论 0

日志如下:
0 info it worked if it ends with ok
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'run', 'serve' ]
2 info using npm@6.7.0
3 info using node@v10.15.1
4 verbose run-script [ 'preserve', 'serve', 'postserve' ]
5 info lifecycle nuxt-te@1.0.0~preserve: nuxt-te@1.0.0
6 info lifecycle nuxt-te@1.0.0~serve: nuxt-te@1.0.0
7 verbose lifecycle nuxt-te@1.0.0~serve: unsafe-perm in lifecycle true
8 verbose lifecycle nuxt-te@1.0.0~serve: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/holy/nuxt-te/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/Users/holy/apache-maven-3.6.0/bin
9 verbose lifecycle nuxt-te@1.0.0~serve: CWD: /Users/holy/nuxt-te
10 silly lifecycle nuxt-te@1.0.0~serve: Args: [ '-c', 'cross-env NODE_ENV=production pm2 start pm2.json' ]
11 silly lifecycle nuxt-te@1.0.0~serve: Returned: code: 1 signal: null
12 info lifecycle nuxt-te@1.0.0~serve: Failed to exec serve script
13 verbose stack Error: nuxt-te@1.0.0 serve: cross-env NODE_ENV=production pm2 start pm2.json
13 verbose stack Exit status 1
13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
13 verbose stack at EventEmitter.emit (events.js:189:13)
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 ChildProcess.emit (events.js:189:13)
13 verbose stack at maybeClose (internal/child_process.js:970:16)
13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
14 verbose pkgid nuxt-te@1.0.0
15 verbose cwd /Users/holy/nuxt-te
16 verbose Darwin 18.6.0
17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "serve"
18 verbose node v10.15.1
19 verbose npm v6.7.0
20 error code ELIFECYCLE
21 error errno 1
22 error nuxt-te@1.0.0 serve: cross-env NODE_ENV=production pm2 start pm2.json
22 error Exit status 1
23 error Failed at the nuxt-te@1.0.0 serve script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文