当前位置:首页 > 程序心得 > 正文内容

npm ERR! Cannot read property 'match' of undefined 错误处理

admin6年前 (2019-06-10)程序心得1702

跟往常一样运行npm install 的时候,突然报错。错误情况如下:


npm ERR! Cannot read property 'match' of undefined
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user\AppData\Roaming\npm-cache\_logs\2018-08-06T01_49_46_486Z-debug.log


查找了很多的方法,有人说清楚npm本地缓存(npm cache clear --force),我都试过了,还是报错。。 

最后删了项目文件夹下面的package-lock.json,然后再运行npm install便可正常的安装了~~~


如果还是不行的话,那就一条条执行下面这四条命令吧~~~


rm -rf node_modules
rm package-lock.json
npm cache clear --force
npm install


分享到:

扫描二维码推送至手机访问。

版权声明:本文由云河空间发布,如需转载请注明出处。

本文链接:http://yuyunhe.cn/index.php/post/292.html

分享给朋友:

“npm ERR! Cannot read property 'match' of undefined 错误处理” 的相关文章

jQuery ajax使用$(this).parent()无效解决方法

本文章来给各位同学介绍一下关于jQuery ajax使用$(this).parent()无效解决方法,希望此方法对各位同学人有所帮助哦html 代码如下复制代码<p class="item"><input type="text" n...

SVN Skipped 'xxx' -- Node remains in conflict 错误的解决办法

svn提交发现错误#cd /home/svn/app/# svn upUpdating '.':Skipped 'xxx' -- Node remains in conflictAt revision 1054.Summary of conflicts: ...

Thinkphp3.2.x 多图上传几个注意点

1、<form enctype="multipart/form-data">2、<form enctype="multipart/form-data">3、<input type="file...

MySQL获得当前日期时间\时间戳函数

MySQL获得当前日期时间\时间戳函数 1.1 获得当前日期+时间(date + time)函数:now()mysql> select now();+———————+| now() |+———————+| 2008-08-08 22:20:46 |+———————+除了 now()...

Jq 网页点击图片放大效果(单张)

Jq 网页点击图片放大效果(单张)

首先引入jq文件:  <script src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>$(function(){     $...

ios5的safari浏览器的电话号码识别功能的禁用

更详细的apple官方文档: https://developer.apple.com/library/safari/#featuredarticles/iPhoneURLScheme_Reference/Articles/PhoneLinks.html在编写 HTML 时,有一个 meta...

发表评论

访客

看不清,换一张

◎欢迎参与讨论,请在这里发表您的看法和观点。