本文介绍了NPM install 和 npm run dev 报错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了 npm i vue-admin-paper-dashboard 包.
然后当我跑步时
npm install 我收到以下错误:

npm 错误!Windows_NT 10.0.15063npm 错误!argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"npm 错误!节点 v6.10.2npm 错误!npm v3.10.10npm 错误!路径 E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.jsnpm 错误!代码 ENOENTnpm 错误!错误号 -4058npm 错误!系统调用 chmodnpm 错误!enoent ENOENT: 没有那个文件或目录,chmod 'E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.js'npm 错误!enoent ENOENT: 没有那个文件或目录,chmod 'E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.js'npm 错误!enoent 这很可能不是 npm 本身的问题npm 错误!enoent 并且与 npm 无法找到文件有关.npm 错误!恩恩特

当我运行 npm run dev 时,出现以下错误:

npm 错误!Windows_NT 10.0.15063npm 错误!argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"npm 错误!节点 v6.10.2npm 错误!npm v3.10.10npm 错误!代码生命周期npm 错误![email protected] dev: `cross-env ENABLE_ESLINT=true node build/dev-server.js`npm 错误!退出状态 1npm 错误!npm 错误!在 [email protected] 开发脚本 'cross-env ENABLE_ESLINT=true node build/dev-server.js' 失败.npm 错误!确保您安装了最新版本的 node.js 和 npm.npm 错误!如果你这样做,这很可能是 vue-admin-paper-dashboard 包的问题,npm 错误!不是 npm 本身.npm 错误!告诉作者这在您的系统上失败:npm 错误!cross-env ENABLE_ESLINT=true node build/dev-server.jsnpm 错误!您可以通过以下方式获取有关如何为此项目打开问题的信息:npm 错误!npm 错误 vue-admin-paper-dashboardnpm 错误!或者,如果这不可用,您可以通过以下方式获取他们的信息:npm 错误!npm 所有者 ls vue-admin-paper-dashboardnpm 错误!上面可能有额外的日志输出.<br/>

注意:我已经全局安装了跨环境包.


我尝试克隆项目:LINK,然后运行 ​​npm安装仍然出现同样的错误.

解决方案

JS-Beautify 1.7.0 坏了,1.6.14 版本必须工作:

https://stackoverflow.com/a/46275582/2953376
https://github.com/beautify-web/js-beautify/issues/第1247章

I have installed package npm i vue-admin-paper-dashboard.
And after that when I run
npm install I am getting below error:

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! path E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod 'E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.js'
npm ERR! enoent ENOENT: no such file or directory, chmod 'E:\xampp\htdocs\VUEjs Templates\VUEjs-1\vue-paper-dashboard\node_modules\js-beautify\js\bin\css-beautify.js'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

And when I run npm run dev, I am getting below error:

npm ERR! Windows_NT 10.0.15063
npm ERR! argv "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "dev"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! [email protected] dev: `cross-env ENABLE_ESLINT=true node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] dev script 'cross-env ENABLE_ESLINT=true node build/dev-server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the vue-admin-paper-dashboard package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env ENABLE_ESLINT=true node build/dev-server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs vue-admin-paper-dashboard
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls vue-admin-paper-dashboard
npm ERR! There is likely additional logging output above.<br />

NOTE: I have installed cross-env package globally.

EDIT:
I have tried cloning the project:
LINK, and then run npm install still I am getting same error.

解决方案

JS-Beautify 1.7.0 is broken, version 1.6.14 must work:

https://stackoverflow.com/a/46275582/2953376
https://github.com/beautify-web/js-beautify/issues/1247

这篇关于NPM install 和 npm run dev 报错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 08:30