总结npm install 和 yarn install出现玄学(版本)问题的处理方式

前言:在vue相关的开发过程中,其实经常会出现npm install 和 yarn install失败,但是你按照他的错误提示处理却无法解决的问题。

接下来介绍对应的几种方式供参考

1.
(1)rm -rf node_modules
(2)npm install --cache /tmp/empty-cache
2.
(1)rm -rf node_modules
(2)npm cache clear --force && npm install --no-shrinkwrap --update-binary
3.
(1)rm -rf node_modules
(2)rm package-lock.json
(3)npm install

猜你喜欢

转载自blog.csdn.net/qq_27295403/article/details/120907758
今日推荐