简体   繁体   English

NPM安装和npm运行开发给出错误

[英]NPM install and npm run dev giving error

I have installed package npm i vue-admin-paper-dashboard . 我已经安装了软件包npm i vue-admin-paper-dashboard
And after that when I run 然后我跑步时
npm install I am getting below error: 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

And when I run npm run dev , I am getting below error: 当我运行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 />

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. 我尝试克隆项目: LINK ,然后运行npm install仍然出现相同的错误。

to fix the JS-Beautify 1.7.0 be sure you are using the node version >= 8. add the package-lock.json in the project root 要修复JS-Beautify 1.7.0,请确保您使用的节点版本> =8。将package-lock.json添加到项目根目录中

add the version of JS-Beautify in the "dependencies" like this: { "name": "my project name", "version": "1.0.0", "lockfileVersion": 1, "dependencies": { "js-beautify": { "version": "1.6.14", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", "dev": true } } } 在“ dependencies”中添加JS-Beautify的版本,如下所示: { "name": "my project name", "version": "1.0.0", "lockfileVersion": 1, "dependencies": { "js-beautify": { "version": "1.6.14", "resolved": "https://registry.npmjs.org/js-beautify/-/js-beautify-1.6.14.tgz", "integrity": "sha1-07j3Mi0CuSd9WL0jgmTDJ+WARM0=", "dev": true } } }

您是否尝试过使用标志--save--save-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM