NPM错误!在Nuxt中安装Vuentify时,fires@4.0.2 install:`node build.js||NodeJS build.js`

2022-03-01 00:00:00 vue.js npm nuxt.js vuetify.js

我使用npx create-nuxt-app

创建了Nuxt应用

但在运行dev servernpm run dev时出现以下错误

 ╭──────────────────────────────────────────────────────────────────╮
   │                                                                  │
   │   ✖ Nuxt Fatal Error                                             │
   │                                                                  │
   │   Error: Module `@nuxtjs/vuetify` not found. Please ensure       │
   │   `@nuxtjs/vuetify` is in `devDependencies` and installed.       │
   │   HINT: During build step, for npm/yarn, `NODE_ENV=production`   │
   │   or `--production` should NOT be used.                          │
   │                                                                  │
   ╰──────────────────────────────────────────────────────────────────╯

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! src@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the src@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

当我尝试运行npm install时,它显示错误(此消息取自npm-cache日志)

781 verbose stack Error: fibers@4.0.2 install: `node build.js || nodejs build.js`
781 verbose stack Exit status 1
781 verbose stack     at EventEmitter.<anonymous> (C:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecycleindex.js:332:16)
781 verbose stack     at EventEmitter.emit (events.js:321:20)
781 verbose stack     at ChildProcess.<anonymous> (C:Program Files
odejs
ode_modules
pm
ode_modules
pm-lifecyclelibspawn.js:55:14)
781 verbose stack     at ChildProcess.emit (events.js:321:20)
781 verbose stack     at maybeClose (internal/child_process.js:1026:16)
781 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
782 verbose pkgid fibers@4.0.2
783 verbose cwd H:\_medical_reports_(_arkham_asylum_)OthersCodeWebvscodegit	ravelersofbanagladeshclientsrc
784 verbose Windows_NT 6.1.7601
785 verbose argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
786 verbose node v13.8.0
787 verbose npm  v6.13.6
788 error code ELIFECYCLE
789 error errno 1
790 error fibers@4.0.2 install: `node build.js || nodejs build.js`
790 error Exit status 1
791 error Failed at the fibers@4.0.2 install script.
791 error This is probably not a problem with npm. There is likely additional logging output above.
792 verbose exit [ 1, true ]

这是一个全新的Nuxt应用,我没有碰过任何文件

我还尝试使用Vue cli创建Nuxt应用程序,它起作用了(没有使用vutify),当我尝试安装vutify时,它也出现了类似的错误

我使用的是今天全新安装的Vue 2.9.6和节点13.8.0


解决方案

node版本14在Windows计算机上使用vutify创建nuxt应用程序时会导致此问题。目前唯一已知的解决方案是将node降级到版本12 LTS。

引用:

nuxt/create-nuxt-app

nuxt-community/vuetify-module

编辑:link for all node releases downloads

相关文章