NPM安装和npm运行开发错误

时间:2017-09-18 09:30:45

标签: node.js npm npm-install

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

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

当我运行npm run dev时,我收到以下错误:

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! vue-admin-paper-dashboard@1.0.0 dev: `cross-env ENABLE_ESLINT=true node build/dev-server.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-admin-paper-dashboard@1.0.0 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 />

注意:我已全局安装了跨env包。

修改
我尝试克隆项目:LINK,然后运行npm install我仍然遇到同样的错误。

3 个答案:

答案 0 :(得分:1)

JS-Beautify 1.7.0已损坏,版本1.6.14必须正常工作:

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

答案 1 :(得分:1)

修复JS-Beautify 1.7.0确保使用节点版本&gt; = 8.在项目根目录中添加package-lock.json

在“依赖项”中添加JS-Beautify的版本,如下所示:  [ 1,2,3,4,5 ] ( 1 : 2 : 3 : 4 : 5 ) >>>1-2-3-4-5<<<

答案 2 :(得分:0)

您是否尝试使用标记--save--save-dev进行安装?