npm 报错:npm ERR! Maximum call stack size exceeded 超过最大栈问题解决方案

  1. 先尝试将npm升级到最新版
1
2
3
4
$ npm install npm -g
# 检查版本
$ npm -v
6.14.5
  1. 运行以下命令删除当前路径下的node_modules目录
1
2
3
4
$ rm node_modules
# Are you sure you want to continue?
# [Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y")
# 键入 Y 或 A

 

运行以下命令强制删除npm缓存,然后重新安装

 
 
1
2
3
$ npm cache clean --force
# 重新安装
$ npm install
   转自https://www.codenong.com/cs106973946/
posted @ 2022-12-03 12:03  @菜鸟爱学习@  阅读(2874)  评论(0编辑  收藏  举报