npm install时出现.staging文件

解决npminstall安装问题
本文介绍了解决npminstall安装时遇到的问题——仅出现.staging文件夹的情况。建议使用系统的CMD控制台而非其他第三方终端进行安装,并检查安装日志以定位并解决问题。

问题
在安装npm install时,在node_modules目录下只有.staging文件

方案
查看node安装日志,找到报错,针对错误日志解决

解释

  • 首先 npm install的时候最好都是用系统的控制台而不是其他的控制台,比如git bash或者VScode里面的终端。如果用这些,那么执行命令时首先会走这些软件,那么不是直接去链接这些包资源,仿佛中间隔了一堵墙,增加了困难,再加上网速受限的话,要么报错,要么出现staging,好一点的顶多速度慢一些,但是这也会影响效率。
  • .staging是在运行过程中出现的,当真正install所有包之后,node_modules里面的包就会显示正常,也就是,出现这个就是没有加载完,没有完成到最好。总之,使用cmd系统控制台是没问题的。
43851 warn enzyme-adapter-utils@1.14.2 requires a peer of react@0.13.x 0.14.x^15.0.0-0 ^16.0.0-0 but none is installed.You must install peer dependencies yourself. 43852 warn airbnb-prop-types@2.16.0 requires a peer of react@0.14^15.0.0 ^16.0.0-alpha but none is installed.You must install peer dependencies yourself. 43853 warn mini-create-react-context@0.4.1 requires a peer of react@0.14.0^15.0.0^16.0.0 ^17.0.0 but none is installed.You must install peer dependencies yourself 43854 verbose stack Error:EPERM:operation not permitted,unlink 'D:\projects\testFACEICD\node_modules\.staging\highcharts-819beecb\es5\highmaps.src.js 43855 verbose cwd D:\projects\testFACEICD 43856 verbose Windows_NT 10.0.17763 43857 verbose argv "C:\\Program Files\\nodejs\node.exe""C:\\Program Files\\nodejs\\node modules\\npm\\bin\\npm-cli.js""i" 43858 verbose node v12.19.0 43859 verbose npm v6.14.8 43860 error code EPERM 43861 error syscall unlink 43862 error path D:\projects\testFACEICD\node modules\.staging\highcharts-819beecb\es5\highmaps.src.js 43863 error errno -4048 43864 error Error:EPERM:operation not permitted,unlink 'D:\projects\testFACEICD\node_modules\.staging\highcharts-819beecb\es5\highmaps.srcjs 43864 error [OperationalError:EPERM:operation not permitted,unlink 'D:\projects\testFACEICD\node_modules\.staging\highcharts-819beecb\es5\highmaps.src.js'] 43864 error cause:[Error:EPERM:operation not permitted,unlink 'D:\projects\testFACEICD\node modules\.staging\highcharts-819beecb\es5\highmaps.src.js']{ 43864 error errno:-4048, 43864 error code:'EPERM' 43864 error syscall:'unlink' 43864 error path:'D:\\projects\\testFACEICD\\node_modules\\.staging\\highcharts-819beecb\\es5\highmaps.src.js 43864 error 43864 error errno:-4048, 43864 error code:'EPERM' 43864 error syscall:'unlink' 43864 error path:'D:\\projects\\testFACEICD\\node modules\\.staging\\highcharts-819beecb\\es5\\highmaps.src.js', 13864 error parent:'testFACEICD 3864 error 43865 error The operation was rejected by your operating system. 43865 error It's possible that the file was already in use (by a text editor or antivirus), 43865 error or that you lack permissions to access it. 43865 error 43865 error If you believe this might be a permissions issue,please double-check the 3865 error permissions of the file and its containing directories,or try running 3865 error the command again as root/Administrator. 3866 verbose exit [-4048,true; npm install失败报错如上,请分析一下原因,并给出解决方案
最新发布
11-06
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值