Disclaimer I ve already…

2 minute read

Disclaimer: I’ve already asked this question in angular’s repo since it’s cli specific but maybe someone can help to workaround this issue? Hi all! I’m having a problem after upgrading to @nrwl/*:9.2.1 and @angular/*:~9.1.0 . Locally everything works fine. The problem comes when my build in CircleCI executes. I run the command ng build frontend --prod The output with the problem is this ........ Warning: Worker #1 exited unexpectedly (code: null | signal: SIGKILL). Current assignment: {entryPoint: @angular/cdk/table, formatProperty: es2015, processDts: true} Error: Process unexpectedly crashed, while processing format property es2015 for entry-point '/home/circleci/project/node_modules/@angular/cdk/table'. ----------- An unhandled exception occurred: NGCC failed. See "/tmp/ng-KMvQso/angular-errors.log" for further details.

Responses:

I’m not for sure, but perhaps it’s related to this: https://github.com/nrwl/nx/pull/2780

I set the environment variable NODE_OPTIONS="--max-old-space-size=4096" before hand

cool, haven’t seen that issue. I saw nx had a PR here https://github.com/nrwl/nx/pull/2758 so i figured I ask here as well :slightly_smiling_face:

Nrwl does a good job of providing migrations for upgrading Angular within an Nx workspace. While you can upgrade your Angular version independently, it would probably be more valuable to let Nx handle that for you as they will make any other necessary changes to make things go smoothly.

I ran my updates with ng update (my workspace is configured to work with ng instead of nx) how do you migrate with nx?

also, I saw that PR and I don’t understand how this relates to my problem :thinking_face: ? can you comment a bit more?

I usually use the Nx CLI, but I believe ng update @nrwl/workspace will handle pretty much anything Nx has pulled in through it’s plugins, including Angular.

That may not directly fix your issue, I just had seen that they were actively working on adding migrations for Angular 9.1.0. It’s possible that another migration gets added to fix something or increase compatibility. That is quite an interesting error though, hm. I’m not a Circle CI expert, but are you able to share what your config looks like?

that’s how I updated it :sweat_smile: . So I guess it’s not related then. thx anyway!

it’s quite big, but the job that runs the frontend build is this build-frontend: executor: node-executor steps: - attach_workspace: at: . - run: name: Build Frontend w/ Production Configuration command: | NODE_OPTIONS="--max-old-space-size=4096" npm run build:frontend - persist_to_workspace: root: . paths: - dist/apps/frontend

and in package.json "build:frontend": "ng build frontend --prod",

Hm, yeah nothing really sticks out to me. It’s a shot in the dark but maybe try upgrading the Node version in the config? Me and someone else were having funky issues with Nx locally that were fixed by upgrading to the latest LTS. Other than that though, that’s all I got. :confused:

Updated: