Angular npm错误!npm安装时超过最大调用堆栈大小(角度)

Angular npm错误!npm安装时超过最大调用堆栈大小(角度),angular,npm,Angular,Npm,我在运行npm安装时得到了这个 npm WARN deprecated ts-simple-ast@12.4.0: NOTICE: ts-simple-ast has been renamed to ts-morph and version reset to 1.0.0. Switch at your leisure... npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted i

我在运行npm安装时得到了这个

npm WARN deprecated ts-simple-ast@12.4.0: NOTICE: ts-simple-ast has been renamed to ts-morph and version reset to 1.0.0. Switch at your leisure...
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated nodemailer@2.7.2: All versions below 4.0.1 of Nodemailer are deprecated. See https://nodemailer.com/status/
npm WARN deprecated nomnom@1.5.2: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN deprecated mailcomposer@4.0.1: This project is unmaintained
npm WARN deprecated socks@1.1.9: If using 2.x branch, please upgrade to at least 2.1.6 to avoid a serious bug with socket data flow and an
import issue introduced in 2.1.0
npm WARN deprecated uws@9.14.0: New code is available at github.com/uNetworking/uWebSockets.js
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated buildmail@4.0.1: This project is unmaintained
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\1-PC\AppData\Roaming\npm-cache\_logs\2019-02-22T21_56_49_385Z-debug.log

转到项目目录并删除节点\u模块文件夹

rm-射频节点单元模块

然后清理你的缓存

npm缓存清理--f

最后重新安装依赖项

npm i


我使用Docker构建了一个react项目,并得到了一个类似的错误(尽管这个错误在本地没有重复)。由于递归调用的嵌套限制,返回此错误

作为一种解决方法,以下命令帮助了我,它增加了递归调用的最大数量:

node——堆栈大小=2000/local/lib/node_modules/npm/bin/npm-cli.js安装


我在

上找到了这个解决方案。当我运行
create react app
命令时,我遇到了这个问题。尽管命令不同,但在为安装各种依赖项而触发时,create react app scaffolding也会运行
npm i
命令

  • 删除位于
    C://nvm/v12.18.3/node_modules/npm
  • npm缓存清理--强制执行
    在项目文件夹之外
  • 然后在项目文件夹中再次运行
    npm i
    ,该文件夹应该可以解决问题
代码编辑器:在管理员模式下运行的Visual Studio代码

主机操作系统:Microsoft Windows 10


在Windows 10中使用NVM运行Node.js。

您运行的是哪个npm安装命令,在哪里(哪个文件夹)运行?您有什么版本的npm?重复的@Salma Ahmed,请添加更多详细信息。您可以在这里找到关于如何询问堆栈溢出问题的指导原则。请共享package.json文件和一些详细信息。这是一个位排序器,不写整个目录
节点--Stack size=2000$(哪个npm)安装
这是最好的答案。10次中有9次是由
node\u modules
文件夹引起的(甚至没有缓存清除帮助)。