【发布时间】:2019-03-01 12:51:27
【问题描述】:
在 Mac 上,我正在尝试按照 Angular.io 教程 (https://angular.io/tutorial/toh-pt0) 中的步骤进行操作
$node -v
v8.11.4
$npm -version
6.4.1
$npm install -g @angular/cli
/usr/local/bin/ng -> /usr/local/lib/node_modules/@angular/cli/bin/ng
+ @angular/cli@6.2.3
updated 1 package in 6.533s
$ng new angular-tour-of-heroes
CREATE angular-tour-of-heroes/e2e/src/app.e2e-spec.ts (318 bytes)
CREATE angular-tour-of-heroes/e2e/src/app.po.ts (208 bytes)
npm ERR! Maximum call stack size exceeded
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/XXXXXX/.npm/_logs/2018-09-25T19_56_34_147Z-debug.log
Package install failed, see above.
我已经尝试过几次了。为什么我在运行ng new angular-tour-of-heroes 时不断收到错误消息npm ERR! Maximum call stack size exceeded?
【问题讨论】:
-
清理 npm 缓存并尝试命令 - npm cache clean --force
-
感谢@HrishikeshKale,但这没有帮助。运行命令后,同样的错误仍然存在。
-
你能按照这个步骤确认 npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest
-
不走运@HrishikeshKale:我试过 1) npm uninstall -g @angular/cli 2) npm cache clean --force 3) npm install -g @angular/cli@latest 4) ng new angular -tour-of-heroes --force -> 与上面显示的结果完全相同
标签: angular-cli angular6