跟往常一样运行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

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

  1. npm ERR! Cannot read property 'match' of undefined

    在Vue项目中运行npm i命令时直接提示npm ERR! Cannot read property 'match' of undefined错误了,此时需要把package-lock.json文件删 ...

  2. npm ERR! Cannot read property 'resolve' of undefined

    一 .有可能是版本过低,或者软件损坏,重新安装一下试试 地址

  3. npm ERR! Cannot read property 'path' of null

    npm错误: 错误信息如下: $ sudo npm install -g bean-sdk sudo: npm: command not found $ npm install -g bean-sdk ...

  4. [转载][jQuery] Cannot read property ‘msie’ of undefined错误的解决方法

    参考 [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 ---------------------------------------- ...

  5. [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法 --转

    初用Yii的srbac模块.出现 Cannot read property ‘msie’ of undefined 错误.上网查询,找到如下的文章.使用文末的打补丁的方法,成功搞定.感谢. ===== ...

  6. [jQuery1.9]Cannot read property ‘msie’ of undefined错误的解决方法

    原文:[jQuery1.9]Cannot read property 'msie' of undefined错误的解决方法 $.browser在jQuery1.9里被删除了,所以项目的js代码里用到$ ...

  7. [jQuery] Cannot read property ‘msie’ of undefined错误的解决方法

    最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property ‘msie’ of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...

  8. jquery升级到新版本报错[jQuery] Cannot read property ‘msie’ of undefined错误的解决方法(转)

    最近把一个项目的jQuery升级到最新版,发现有些页面报错Cannot read property 'msie' of undefined.上jQuery网站上搜了一下,原因是$.browser这个a ...

  9. 关于百度地图(离线)使用过程报“Cannot read property 'jb' of undefined ”错误的解决办法

    使用百度地图(离线)API时,地图无法显示,f12查看报错: BaiduApi_2.0.js:1056 Uncaught TypeError: Cannot read property 'jb' of ...

随机推荐

  1. 一个比较好用的Socket测试工具——Hercules SETUP

    官网:http://www.hw-group.com/products/hercules/index_en.html 不要再自己傻傻的写socket测试客户端了 Hercules is great u ...

  2. eclipse 安装tomcat

  3. [java,maven] 使用 maven 来搭建简单的 netty 开发环境

    大致过程是: 首先, 使用 mvn 命令在指定路径下面创建一套简单的  java 文件包. 然后, 使用 JIdea 导入 maven 项目的方式将创建好的文件包加载到 IDE 环境中.‘ 接下来, ...

  4. Algorithm: dynamic programming

    1. Longest Increasing Subsequence (LIS) problem unsorted array, calculate out the maximum length of ...

  5. python清空tree.insert()

    import tkinter from tkinter import ttk # 导入内部包 li = [', '男'] root = tkinter.Tk() root.title('测试') tr ...

  6. jQuery选项卡tabulous

    jQuery选项卡tabulous,jQuery,选项卡,tab标签切换代码,扁平设计,jQuery选项卡tabulous是一款支持Scale.Slide.Scale Up.Flip等效果jquery ...

  7. Zookeeper用来干什么?

    在Zookeeper的官网上有这么一句话:ZooKeeper is a centralized service for maintaining configuration information, n ...

  8. Shell读取文件内容【转】

    while read wOne wTwo wThreedo    [ -z $wOne ] && continue           #测试此行内容是否为空    xxx=$wOne ...

  9. 【Lintcode】087.Remove Node in Binary Search Tree

    题目: Given a root of Binary Search Tree with unique value for each node. Remove the node with given v ...

  10. 浏览器,tab页显示隐藏的事件监听--页面可见性

    //监听浏览器tab切换,以便在tab切换之后,页面隐藏的时候,把弹幕停止 document.addEventListener('webkitvisibilitychange', function() ...