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

92% after chunk asset optimization SourceMapDevToolPlugin vendor.js generate SourceMapKilled #13005

Closed
luther-nwpu opened this issue Nov 20, 2018 · 17 comments
Labels
area: @angular-devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix
Milestone

Comments

@luther-nwpu
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)

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

Versions

node 10.13
npm 6.4.1

Repro steps

ng new my-app
ng serve

The log given by the failure

Desired functionality

92% after chunk asset optimization SourceMapDevToolPlugin vendor.js generate SourceMapKilled

Mention any other details that might be useful

In centos, it happened. But in windows, it is normal.

@alan-agius4
Copy link
Collaborator

Hi, can you share the versions you are using by running:

ng version

@alan-agius4 alan-agius4 added the needs: more info Reporter must clarify the issue label Nov 20, 2018
@luther-nwpu
Copy link
Author

Angular CLI: 7.0.6
Node: 10.13.0
OS: linux x64
Angular:
...

Package Version

@angular-devkit/architect 0.10.6
@angular-devkit/core 7.0.6
@angular-devkit/schematics 7.0.6
@schematics/angular 7.0.6
@schematics/update 0.10.6
rxjs 6.3.3
typescript 3.1.6

@alan-agius4 alan-agius4 added needs: investigation Requires some digging to determine if action is needed area: @angular-devkit/build-angular and removed needs: more info Reporter must clarify the issue labels Nov 20, 2018
@ngbot ngbot bot added this to the needsTriage milestone Nov 20, 2018
@filipesilva
Copy link
Contributor

@luther-nwpu does this happen with a brand new project on CentOS? Or just on your project?

@filipesilva filipesilva added type: bug/fix freq1: low Only reported by a handful of users who observe it rarely severity3: broken labels Nov 20, 2018
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Nov 20, 2018
@hellocomrade
Copy link

hellocomrade commented Jan 5, 2019

I got the same problem, there is actually a webpack-contrib issue reported as well that might suggest this is a upstream issue:

webpack-contrib/uglifyjs-webpack-plugin#272

That has been said, I turned off both optimization and sourcemap flag in angular.json, but still got this error.

This is on a brand new project created through cli. This project was created on VM in cloud with only 1 vCPU and 512MB RAM. So, my guess is this is an OOM somewhere.

Angular CLI: 7.1.4
Node: 11.6.0
OS: linux x64
Angular: 7.1.4
... animations, cli, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package Version

@angular-devkit/architect 0.11.4
@angular-devkit/build-angular 0.11.4
@angular-devkit/build-optimizer 0.11.4
@angular-devkit/build-webpack 0.11.4
@angular-devkit/core 7.1.4
@angular-devkit/schematics 7.1.4
@ngtools/webpack 7.1.4
@schematics/angular 7.1.4
@schematics/update 0.11.4
rxjs 6.3.3
typescript 3.1.6
webpack 4.23.1

@devloprNaveen
Copy link

Angular CLI: 6.0.8
Node: 10.12.0
OS: linux x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular-devkit/architect 0.6.8
@angular-devkit/build-angular 0.6.8
@angular-devkit/build-optimizer 0.6.8
@angular-devkit/core 0.6.8
@angular-devkit/schematics 0.6.8
@angular/cdk 6.4.7
@angular/cli 6.0.8
@angular/fire 5.0.2
@angular/flex-layout 6.0.0-beta.18
@angular/material 6.4.7
@ngtools/webpack 6.0.8
@schematics/angular 0.6.8
@schematics/update 0.6.8
rxjs 6.2.2
typescript 2.9.2
webpack 4.8.3
Even my build is getting broken

@mgechev
Copy link
Member

mgechev commented Jan 8, 2019

Just for a reference #5775.

@hellocomrade
Copy link

Well, it appears to be an OOM issue. My test environment is on GCP. Once I bumped instance from micro (512MB RAM) to small (1.7G RAM). This problem disappeared.

Can't believe the fact that nowadays Javascript library requires that much resource to "compile"...

@tgirotto
Copy link

tgirotto commented Jun 25, 2019

same as @hellocomrade. upgraded from 1GB to 2GB RAM on digital ocean and it started working.

@pppdns
Copy link

pppdns commented Jun 26, 2019

you'll soon need much more memory for sure. Unfortunately Angular builds need more and more gigabytes of memory as the project grows, especially when using AOT and differential loading. Also, Node.js has a default memory limit somewhere between 1 and 2 GB. So it's quite common to use this in Angular projects: node --max-old-space-size=8196 node_modules/@angular/cli/bin/ng build

@byronglendon
Copy link

Try this, worked for me:
ng serve --sourceMap=false

@catchmareck
Copy link

@byronglendon I've encountered this issue 10 minutes ago and your suggestion worked for me as well. Thanks!

@tuongpgjz
Copy link

Well, it saves my days! @byronglendon

@albertofbs15
Copy link

Thanks you very much @byronglendon

@samubustillo
Copy link

@byronglendon wonderfull!

@alan-agius4
Copy link
Collaborator

Closing as per explanation in one of the above comments #13005 (comment)

If the problem persists, please open a new issue, provide a simple repository reproducing the problem, and describe the difference between the expected and current behavior.

@SchnWalter
Copy link
Contributor

Regarding that comment, you can provide a NODE_OPTIONS environment variable and you won't need to change your commands. I've added this to my ~/.bashrc:

export NODE_OPTIONS=--max_old_space_size=8192

@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 Jun 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: @angular-devkit/build-angular freq1: low Only reported by a handful of users who observe it rarely needs: investigation Requires some digging to determine if action is needed severity3: broken type: bug/fix
Projects
None yet
Development

No branches or pull requests