npm install fail -- 错误信息:enoent ENOENT: no such file or directory
npm install fail -- error message: enoent ENOENT: no such file or directory
我正在使用 vue init webpack project_name
构建一个 Vue.js 项目,在这一步之后我 运行 npm install
。 npm 抛出了以下错误:
npm ERR! path /Users/duodian/Desktop/crop-demo/node_modules/js-
beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod
'/Users/duodian/Desktop/crop-demo/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/duodian/.npm/_logs/2017-09-18T09_55_20_047Z-debug.log
节点版本 8.5.0
npm 版本 5.3.0
注意:我刚刚将我的 macOS HighSierra 更新到 10.13 Beta,这会影响吗?
有朋友遇到过这个问题吗?
这是因为 js-beautify@1.7 我坏了。所以,尝试将 vue-cli 降级到 2.7.0 是解决此问题的临时解决方法
npm install -g vue-cli@2.7.0
运行
npm install js-beautify@1.6.14
然后
npm install (assuming that you are installing deps in package.json)
对我有用。从这里得到它。
https://github.com/beautify-web/js-beautify/issues/1247
我正在使用 vue init webpack project_name
构建一个 Vue.js 项目,在这一步之后我 运行 npm install
。 npm 抛出了以下错误:
npm ERR! path /Users/duodian/Desktop/crop-demo/node_modules/js-
beautify/js/bin/css-beautify.js
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod
'/Users/duodian/Desktop/crop-demo/node_modules/js-beautify/js/bin/css-beautify.js'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/duodian/.npm/_logs/2017-09-18T09_55_20_047Z-debug.log
节点版本 8.5.0
npm 版本 5.3.0
注意:我刚刚将我的 macOS HighSierra 更新到 10.13 Beta,这会影响吗?
有朋友遇到过这个问题吗?
这是因为 js-beautify@1.7 我坏了。所以,尝试将 vue-cli 降级到 2.7.0 是解决此问题的临时解决方法
npm install -g vue-cli@2.7.0
运行
npm install js-beautify@1.6.14
然后
npm install (assuming that you are installing deps in package.json)
对我有用。从这里得到它。 https://github.com/beautify-web/js-beautify/issues/1247