Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ng7 App generate fails with "npm ERR! Maximum call stack size exceeded" #12885

Closed
anuramesh1 opened this issue Nov 7, 2018 · 7 comments
Closed

Comments

@anuramesh1
Copy link

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

Command (mark with an x)

- [ x] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc

Versions

Angular CLI: 7.0.4
Node: 8.11.1
OS: win32 x64

Repro steps

ng new my-app

The log given by the failure

? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
CREATE my-app/angular.json (3768 bytes)
CREATE my-app/package.json (1313 bytes)
CREATE my-app/README.md (1022 bytes)
CREATE my-app/tsconfig.json (408 bytes)
CREATE my-app/tslint.json (2837 bytes)
CREATE my-app/.editorconfig (245 bytes)
CREATE my-app/.gitignore (503 bytes)
CREATE my-app/src/favicon.ico (5430 bytes)
CREATE my-app/src/index.html (292 bytes)
CREATE my-app/src/main.ts (372 bytes)
CREATE my-app/src/polyfills.ts (3234 bytes)
CREATE my-app/src/test.ts (642 bytes)
CREATE my-app/src/styles.css (80 bytes)
CREATE my-app/src/browserslist (388 bytes)
CREATE my-app/src/karma.conf.js (964 bytes)
CREATE my-app/src/tsconfig.app.json (166 bytes)
CREATE my-app/src/tsconfig.spec.json (256 bytes)
CREATE my-app/src/tslint.json (314 bytes)
CREATE my-app/src/assets/.gitkeep (0 bytes)
CREATE my-app/src/environments/environment.prod.ts (51 bytes)
CREATE my-app/src/environments/environment.ts (662 bytes)
CREATE my-app/src/app/app-routing.module.ts (245 bytes)
CREATE my-app/src/app/app.module.ts (393 bytes)
CREATE my-app/src/app/app.component.html (1173 bytes)
CREATE my-app/src/app/app.component.spec.ts (1095 bytes)
CREATE my-app/src/app/app.component.ts (210 bytes)
CREATE my-app/src/app/app.component.css (0 bytes)
CREATE my-app/e2e/protractor.conf.js (752 bytes)
CREATE my-app/e2e/tsconfig.e2e.json (213 bytes)
CREATE my-app/e2e/src/app.e2e-spec.ts (302 bytes)
CREATE my-app/e2e/src/app.po.ts (208 bytes)
npm WARN deprecated circular-json@0.5.9: CircularJSON is in maintenance only, flatted is its successor.
npm ERR! Maximum call stack size exceeded

Desired functionality

my-app should have been created successfully.

Mention any other details that might be useful

I tried to follow previous bug-fixes by removing .npmrc file and cleaning npm-cache etc.But nothing worked. I keep getting same error every-time I try to generate a new app using the new angular-cli for 7 version.

@alan-agius4
Copy link
Collaborator

alan-agius4 commented Nov 7, 2018

This seems like a problem with your node/npm and not with Angular CLI.

Please have a look at the fixing npm permissions page, common errors page, npm issue tracker, or open a new issue in that issue tracker if the problem you are experiencing isn't known.

That said, have you tried to run npm rebuild

@anuramesh1
Copy link
Author

anuramesh1 commented Nov 8, 2018

@alan-agius4 Thanks for your response. Yes, I tried everything,

Updated the node to node: 10.13.0 --

Angular CLI: 7.0.4
Node: 10.13.0
OS: win32 x64

  • I deleted npm-cache directory and retried again -- Got same error.

  • I changed the NODE_HOME to a different dir and updated "path" and tried again. -- Got same error

-- npm rebuild is only on a specific project right? Since I don't have the project itself successfully created, I can't go that...

Bottom line - I can't successfully create a new angular 7 project with Node 10 or node 8. Is there any angular 7 starter/seed project?

I have no clue at this point. The following is the stractrace in npm-debug.log file.

3467 silly resolveWithNewModule @webassemblyjs/helper-fsm@1.7.6 checking installable status
3468 http fetch GET 404 https://registry.npmjs.org/@xtuc%2flong 723ms
3469 silly fetchPackageMetaData error for @xtuc/long@4.2.1 404 Not Found: @xtuc/long@4.2.1
3470 verbose stack RangeError: Maximum call stack size exceeded
3470 verbose stack at RegExp.test ()
3470 verbose stack at isDepOptional (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:405:45)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:414:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3470 verbose stack at failedDependency (C:\Java\NodeJs\node-v10.13.0\node_modules\npm\lib\install\deps.js:430:9)
3471 verbose cwd C:_Repos\ng7
3472 verbose Windows_NT 10.0.14393
3473 verbose argv "C:\Java\NodeJs\node-v10.13.0\node.exe" "C:\Java\NodeJs\node-v10.13.0\node_modules\npm\bin\npm-cli.js" "install" "--quiet"
3474 verbose node v10.13.0
3475 verbose npm v6.4.1
3476 error Maximum call stack size exceeded
3477 verbose exit [ 1, true ]

@michal-husak
Copy link

I had the same problem. I removed the content of .npmrc, ran the generate command and it worked. After that you can restore the content of your .npmrc if needed.

@jphchen
Copy link

jphchen commented Apr 4, 2019

the solution above worked, but why is having a .npmrc in your user home causing "Maximum call stack size exceeded" ?

@Gouravraj
Copy link

I am also getting the same problem while creating a new app.Can anyone help me here how to resolve the issue
Capture1245

@KeithPepin
Copy link

KeithPepin commented Apr 29, 2019

What worked for me was what someone else mentioned above, I cleaned out the contents of my global .npmrc, ran the install, it worked, put back the contents of my .npmrc and everything was normal again. For what it is worth, the only things in my .npmrc were proxy settings required for my work place.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants