Nuxt初始化项目时报错

发布于 2022-09-12 03:47:20 字数 2420 浏览 18 评论 0

根据官方文档步骤初始化,又拉取Git上的项目,全都报一样的错误,各种百度也找不到原因

npm install
npm run dev
npm run build
npm run start

报错截图

image.png

报错日志

1 verbose cli [ '/usr/local/Cellar/node/9.5.0/bin/node',
1 verbose cli   '/usr/local/bin/npm',
1 verbose cli   'run',
1 verbose cli   'dev' ]
2 info using npm@5.6.0
3 info using node@v9.5.0
4 verbose run-script [ 'predev', 'dev', 'postdev' ]
5 info lifecycle ssr@1.0.0~predev: ssr@1.0.0
6 info lifecycle ssr@1.0.0~dev: ssr@1.0.0
7 verbose lifecycle ssr@1.0.0~dev: unsafe-perm in lifecycle true
8 verbose lifecycle ssr@1.0.0~dev: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/Users/dongdong/Documents/develop/My web/ppNuxt/node_modules/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/Apple/usr/bin:/Users/dongdong/Documents/develop/My web/ppNuxt/node_modules/.bin
9 verbose lifecycle ssr@1.0.0~dev: CWD: /Users/dongdong/Documents/develop/My web/ppNuxt
10 silly lifecycle ssr@1.0.0~dev: Args: [ '-c', 'nuxt' ]
11 silly lifecycle ssr@1.0.0~dev: Returned: code: 1  signal: null
12 info lifecycle ssr@1.0.0~dev: Failed to exec dev script
13 verbose stack Error: ssr@1.0.0 dev: `nuxt`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16)
13 verbose stack     at EventEmitter.emit (events.js:160: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:160:13)
13 verbose stack     at maybeClose (internal/child_process.js:943:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
14 verbose pkgid ssr@1.0.0
15 verbose cwd /Users/dongdong/Documents/develop/My web/ppNuxt
16 verbose Darwin 19.6.0
17 verbose argv "/usr/local/Cellar/node/9.5.0/bin/node" "/usr/local/bin/npm" "run" "dev"
18 verbose node v9.5.0
19 verbose npm  v5.6.0
20 error code ELIFECYCLE
21 error errno 1
22 error ssr@1.0.0 dev: `nuxt`
22 error Exit status 1
23 error Failed at the ssr@1.0.0 dev 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 和您的相关数据。
原文