npm error:no such file or directory/dependencies.. not found ?

$ git clone ht tps://github.com/vqlai/vue2-football.git

$ npm install
npm ERR! path D:\web-save\ceshi\vue2-football\node_modules\js-beautify\js\bin\cs s-beautify.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod 'D:\web-save\ceshi\vue2 -football\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! C:\Users\QiHuaBu\AppData\Roaming\npm-cache\_logs\2017-09-18T06_38_4 5_183Z-debug.log

下载别人的GitHub查看,报错了??
这是什么情况??
老铁们,帮忙看看>_<

PS:运行的结果:Cannot GET /

错误提示:

These dependencies were not found:

  • pages/news/news.vue in ./src/router/index.js
  • pages/detail/detail.vue in ./src/router/index.js
  • pages/race/race.vue in ./src/router/index.js
  • pages/data/data.vue in ./src/router/index.js
  • pages/video/video.vue in ./src/router/index.js

To install them, you can run: npm install --save pages/news/news.vue pages/detail/detail.vue pages/race/race.vue pages/data/data.vue pages/video/video.vue

This relative module was not found:

  • ./App in ./src/main.js

PPS:感谢各位老铁~_~

阅读 10.7k
10 个回答

从github上下载 js-beautify ,然后放到node_modules文件夹,再用淘宝镜像 cnpm install,就不会报错了,npm run dev就可以运行了。

我之前一个同事也是遇到这个问题,我把他的代码删了使用我的就好领。
他是win10系统。
初步估计是没有权限,node运行的时候创建文件夹没权限或者变成领创建文件了

网的问题吧..
1.试试cnpm
2.下载js-beautify到你的node_modules,然后再执行npm i

好尴尬,试了试cnpm装js-beautify1.7.0也装不了,直接从github上下了下来,放到项目node_modules文件夹 跑的好好的。github地址:js-beautify1.7.0地址

npm安装插件是npm安装插件是从国外服务器下载,受网络影响大,可能出现异常,命令提示符执行npm install cnpm -g --registry=https://registry.npm.taobao.org cnpm跟npm用法完全一致 上面你是不是多打了一个空格

新手上路,请多包涵

D:vueoam-ui>cnpm install
× Install fail! Error: ENOENT: no such file or directory, chmod 'D:vueoam-ui\
node_modules_js-beautify@1.7.0@js-beautifyjsbincss-beautify.js'
Error: ENOENT: no such file or directory, chmod 'D:vueoam-uinode_modules_js-
beautify@1.7.0@js-beautifyjsbincss-beautify.js' 用 cnpm 出现 这个是怎么回事?

新手上路,请多包涵

js-beautify 1.7 安装时存在相同的问题,使用 js-beautify 1.6.0 安装就行了

我的电脑更新win10后也是这个问题,重新安装淘宝镜像后,已处理

新手上路,请多包涵

如果你在github上搜索了js-beauty,你就会知道js-beauty已经空了,不知道为什么,知道的大佬求留言啊。
建议你使用yarn安装,更新于2017.9.18
npm install yarn -g
yarn install

权限不够,试试sudo npm install

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进