关于vue.js:npm-ERR-Cannot-read-property-match-of-undefined-错误处理

6次阅读

共计 407 个字符,预计需要花费 2 分钟才能阅读完成。

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

回顾了一下 应该是我的项目多出了 package-lock.json 导致的

依照以下步骤顺次操作即可:

  1. npm cache clear --force (执行实现后 npm install 没效再执行步骤 2)
  2. 删了我的项目文件夹上面的 package-lock.json, 而后再运行 npm install(没效执行步骤 3)
  3. rm -rf node_modules
    rm package-lock.json
    npm cache clear --force
    npm install
正文完
 0