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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnhandledPromiseRejectionWarning: Error: spawn ENOMEM #18102

Closed
GlauberF opened this issue Jun 30, 2020 · 9 comments
Closed

UnhandledPromiseRejectionWarning: Error: spawn ENOMEM #18102

GlauberF opened this issue Jun 30, 2020 · 9 comments
Labels
needs: more info Reporter must clarify the issue

Comments

@GlauberF
Copy link

馃悶 bug report

Affected Package

@angular/*

Description

when running the command node --max_old_space_size=6144 ./node_modules/@angular/cli/bin/ng serve --open I get an error.

馃敟 Exception or Error


(node:7700) UnhandledPromiseRejectionWarning: Error: spawn ENOMEM
    at ChildProcess.spawn (internal/child_process.js:407:11)
    at Object.spawn (child_process.js:548:9)
    at module.exports (/var/www/html/pwa_vimbo/node_modules/open/index.js:144:34)
(node:7700) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1469)
(node:7700) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

馃實 Your Environment

Angular Version:


Angular CLI: 10.0.0
Node: 12.18.1
OS: linux x64

Angular: 10.0.1
... animations, cdk, common, compiler, compiler-cli, core, forms
... language-service, material, material-moment-adapter
... platform-browser, platform-browser-dynamic, platform-server
... router, service-worker
Ivy Workspace: Yes

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.1000.0
@angular-devkit/build-angular     0.1000.0
@angular-devkit/build-optimizer   0.901.1
@angular-devkit/build-webpack     0.1000.0
@angular-devkit/core              10.0.0
@angular-devkit/schematics        10.0.0
@angular/cli                      10.0.0
@angular/flex-layout              9.0.0-beta.29
@ngtools/webpack                  10.0.0
@nguniversal/builders             10.0.0
@nguniversal/common               10.0.0
@nguniversal/express-engine       10.0.0
@schematics/angular               10.0.0
@schematics/update                0.1000.0
rxjs                              6.5.5
typescript                        3.9.5
webpack                           4.43.0

@AndrewKushnir
Copy link

Hi @GlauberF,

It looks like the problem might be related to the Angular CLI, so I'm transferring this issue there for further investigation.

Also, it'd be helpful if you could provide some additional information about this issue:

  • is this problem appeared after Angular upgrade (if so, which versions you had before) or NodeJS upgrade
  • if the project was created using Angular CLI (ng new)
  • if the problem started to happen after you added/removed some packages

Thank you.

@AndrewKushnir AndrewKushnir transferred this issue from angular/angular Jul 1, 2020
@GlauberF
Copy link
Author

GlauberF commented Jul 1, 2020

@AndrewKushnir It is an old project, which I have been updating as it has new versions of the angular.
This started after upgrading to version 10 of the angular

@clydin
Copy link
Member

clydin commented Jul 1, 2020

This looks like a duplicate of #18087 which will be fixed in the next patch release.

@GlauberF
Copy link
Author

GlauberF commented Jul 1, 2020

are different things @clydin

@alan-agius4
Copy link
Collaborator

@GlauberF, can you try to set the assets to an empty array and see it the problem persists?

@clydin
Copy link
Member

clydin commented Jul 1, 2020

The open package tried to spawn the browser but the system had no memory left. If there were not a large amount of other applications open then this is most likely due to the serve process using an excessive amount of memory. The Angular framework version 10.0.2 and the upcoming Angular CLI 10.0.1 both contain memory usage fixes which may resolve the later.

@alan-agius4
Copy link
Collaborator

@GlauberF, is this problem still reproducible with the latest patch version?

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Jul 2, 2020
@GlauberF
Copy link
Author

GlauberF commented Jul 2, 2020

I'm closing, because with the update for the latest patch mentioned here, it solved the problem.

@GlauberF GlauberF closed this as completed Jul 2, 2020
@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 Aug 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: more info Reporter must clarify the issue
Projects
None yet
Development

No branches or pull requests

4 participants