npm install报错 npm ERR! enoent ENOENT: no such file or directory
在npm之后出现如下错误:
$ npm install
npm WARN checkPermissions Missing write access to /Users/lucas/code/js/vue/train/vue-sample/node_modules/follow-redirects
npm ERR! path /Users/lucas/code/js/vue/train/vue-sample/node_modules/follow-redirects
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access '/Users/lucas/code/js/vue/train/vue-sample/node_modules/follow-redirects'
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/lucas/.npm/_logs/2017-12-12T16_03_34_223Z-debug.log
关于这个错误,网上有很多解决方法,但是都不适用在我这里。
解决方法
从错误来看, 是 /Users/lucas/code/js/vue/train/vue-sample/node_modules/follow-redirects 这个文件没有权限或者没有找到。
然后 ls 了一下这个文件, 得到如下结果:
$ ls -lt | grep follow-redirects
lrwxr-xr-x 1 lucas staff 40 12 12 23:39 follow-redirects -> _follow-redirects@1.2.6@follow-redirects
可以看到这个是一个软连接,链接到 _follow-redirects@1.2.6@follow-redirects 这个上面,很明显,在这个目录是没有follow-redirects 这个东西的。
怎么办呢? 很简单 npm install follow-redirects 把这个东西安装上去就好了。
安装完成之后, 再 ls 一把
$ ls -lt | grep follow
drwxr-xr-x 10 lucas staff 320 12 13 00:22 _follow-redirects@1.2.6@follow-redirects
lrwxr-xr-x 1 lucas staff 40 12 12 23:39 follow-redirects -> _follow-redirects@1.2.6@follow-redirects
可以看到已经有了。
然后在 npm install 就没有错了。
npm install报错 npm ERR! enoent ENOENT: no such file or directory的更多相关文章
- npm install 报错:node-pre-gyp ERR! 问题解决
npm install报错问题解决 问题: E:\CodeSpace\GitlabTest\desktop>npm install > lifeccp-desktop@1.1.9 post ...
- npm install 报错:ERR! code EINTEGRITY 解决方案
npm升级后,npm install 报错了,报错信息:ERR! code EINTEGRITY到处百度搜索解决方案,终于找到了!“npm cache verify”这条命令帮助了不少人 npm ca ...
- 『奇葩问题集锦』npm install 报错 node-pre-gyp ERR! node-pre-gyp -v v0.6.25
gyp ERR! configure error gyp ERR! stack Error: Can't find Python executable "python", you ...
- 输入npm install 报错npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.1 postinstall: `node scripts/build.js`
输入npm install 报以下错误 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.13.1 postinstall: ...
- npm install报错npm ERR! Maximum call stack size exceeded解决
给npm降级或者升级 比如: 降级 : npm install -g npm@6.1.0 升级 : npm install -g npm 升级到最新版
- 执行npm install报错:npm ERR! code EINTEGRITY
命令行执行npm install报错如下: D:\frontend\viewsdev>npm install npm ERR! code EINTEGRITY npm ERR! sha512-8 ...
- npm install 报错 error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,"d' 解决办法
npm install 报错 : error Unexpected end of JSON input while parsing near '...sShrinkwrap":false,& ...
- 在运行vue项目时,执行npm install报错小记
在运行vue项目时,执行npm install 报错,导致后续的执行报各种错误,根据报错,尝试了网上的各种办法,最后发现时网络问题下载失败导致,解决办法: 安装cnpm==>npm instal ...
- npm install 报错解决办法
npm install 报错解决办法 原因是因为node_modules可能有意外改动,导致依赖库不完整,删除项目下的node_modules,在你的项目目录下,重新执行npm install,这会重 ...
随机推荐
- Git 恢复本地误删的文件
通过git进行代码管理的项目,如果在本地编辑的过程中误删了某些文件或者文件夹,可以通过git操作来复原. Step 1: git status 查看本地对改动的暂存记录.如下图所示,本人误删了文件夹“ ...
- screen mac linux下一种让程序后台运行的方法
1: screen 场景的意思.字面意思就是软件运行在不同场景 (1)创建会话 使用命令“screen -S RunWork”来创建一个screen会话,命令执行之后,就会得到一个新的shell窗口, ...
- maven五:查找jar包坐标,选择jar包版本
查找jar包坐标 以spring core的jar包为例,访问http://www.mvnrepository.com/ 在最上方中间,输入spring core,点击Search. 搜索结果第 ...
- 多浏览器播放wav格式的音频文件
html5的audio标签只在火狐下支持wav格式的音频播放,无法兼容IE和google , 使用audioplayer.js 基本上能支持大部分浏览器播放wav音频文件,经测试IE.火狐.googl ...
- SMBus与I2C的差别
The I²C bus and the SMBus are popular 2-wire buses that areessentially compatible with each other. - ...
- macOS 下NFS 文件系统挂载
主要有两种方式: 使用:resvport选项, mount 挂载命令时. 使用:insecure选项, exportfs 文件配置时. sudo mount -o resvport IP:Addr b ...
- rpm安装时出现循环依赖
在安装git包时提示要安装perl-git,当安装perl-git时又提示要安装git包.报错如下: [root@racdb1 Packages]# rpm -ivh perl-Git-1.7.1-4 ...
- 针对需要使用T3协议的Weblogic2628漏洞解决方案
针对需要使用T3协议的Weblogic2628漏洞解决方案 前几天用户的服务器中检查到了Weblogic2628l漏洞,并且打过Oracle官方补丁后还是能检测到. 针对此问题,去网上查找了一些资料. ...
- 4.9Python数据类型(5)列表(新版)
前言 列表是一种python类似数组的数据结构,操作灵活,可存储多种类型的数据. 目录 1.列表的基础知识 2.列表的增删改查并操作 3.列表的其他操作 4.基本方法表 (一)列表的基础知识 1.说明 ...
- 12种不宜使用的javascript的语法
1. == Javascript有两组相等运算符,一组是==和!=,另一组是===和!==.前者只比较值的相等,后者除了值以外,还比较类型是否相同. 请尽量不要使用前一组,永远只使用===和!==.因 ...