无法创建新的nuxt项目。使用 npm init nuxt-app nuxt-hello-world 时出现问题

问题描述 投票:0回答:1

一切正常,直到第 30 行,然后我得到:

31 silly logfile start cleaning logs, removing 1 files
32 timing arborist:ctor Completed in 0ms
33 silly logfile done cleaning log files
34 http fetch GET 200 https://registry.npmjs.org/create-nuxt-app 149ms (cache revalidated)
35 timing arborist:ctor Completed in 0ms
36 timing command:init Completed in 249ms
37 verbose stack Error: command failed
37 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:53:27)
37 verbose stack     at ChildProcess.emit (node:events:518:28)
37 verbose stack     at maybeClose (node:internal/child_process:1105:16)
37 verbose stack     at ChildProcess._handle.onexit (node:internal/child_process:305:5)
38 verbose cwd /Volumes/My Passport 1/myusername/mydirect
39 verbose Darwin 23.2.0
40 verbose node v20.11.0
41 verbose npm  v10.2.4
42 error code 127
43 error path /Volumes/My Passport 1//myusername/mydirect
44 error command failed
45 error command sh -c create-nuxt-app nuxt-hello-world
46 verbose exit 127
47 timing npm Completed in 333ms
48 verbose code 127

我使用的是 Mac。 vue 版本给了我 @vue/cli 5.0.8 我还可以创建一个 vue 应用程序并毫无问题地执行它 谢谢!

nuxt.js
1个回答
0
投票

我们需要使用

npx nuxi@latest init nuxt-hello-world

© www.soinside.com 2019 - 2024. All rights reserved.