npm error: Maximum call stack size exceeded

在新项目进行npm install时发生的错误,网上的解决方法有两种:

降级:npm install -g npm@5.4.0

升级:npm install -g npm
首先升级,升级后依然报错,故降级,降级后出现这个错误:
WARNING: You are likely using a version of node-tar or npm that is incompatible with this version of Node.js.\staging-
Please use either the version of npm that is bundled with Node.js, or a version of npm (> 5.5.1 or < 5.4.0) or node-tar (> 4.0.1) that is compatible with Node.js 9 and above.
npm[15592]: src\node_zlib.cc:436: Assertion `args.Length() == 7 && “init(windowBits, level, memLevel, strategy, writeResult, writeCallback,” " dictionary)"’ failed.
1: 00007FF700D79055
2: 00007FF700D52FE6
3: 00007FF700D530B1
4: 00007FF700CC541C
5: 00007FF70136B022
6: 00007FF70136C4CD
7: 00007FF70136B559
8: 00007FF70136B43B
9: 000002C0D18841C1

原来是node.js的问题,看来要重装node.js了,
首先uninstall npm:
npm uninstall -g npm

接着去这个网站重装nodejs:
https://nodejs.org

最后重装npm:
npm install -g npm

再npm install, 就可以了。

此时报错:
npm WARN angular-esri-components@1.0.3 requires a peer of @angular/common@^2.3.1 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-components@1.0.3 requires a peer of @angular/core@^2.3.1 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-loader@1.1.1 requires a peer of @angular/core@^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-loader@1.1.1 requires a peer of rxjs@^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.1.3 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“win32”,“arch”:“x64”})

audited 21840 packages in 25.795s
found 15 vulnerabilities (9 low, 6 high)
run npm audit fix to fix them, or npm audit for details

我们运行npm audit fix --force
还是报错(警告):
npm WARN angular-esri-components@1.0.3 requires a peer of @angular/common@^2.3.1 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-components@1.0.3 requires a peer of @angular/core@^2.3.1 || ^5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-loader@1.1.1 requires a peer of @angular/core@^4.1.1 but none is installed. You must install peer dependencies yourself.
npm WARN angular-esri-loader@1.1.1 requires a peer of rxjs@^5.3.0 but none is installed. You must install peer dependencies yourself.
npm WARN bootstrap@4.1.3 requires a peer of popper.js@^1.14.3 but none is installed. You must install peer dependencies yourself.

此时运行:
npm install -g npm-install-peers

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值