56

I had to run an "npm audit fix" on my project and from there after all "ng serve", I get the following error:

ERROR in TypeError: tooling_1.constructorParametersDownlevelTransform is not a function

Has anyone ever experienced this?

Thank you!

SOLUTION:

npm install @angular-devkit/build-angular@0.901.9
René Gustavo
  • 693
  • 1
  • 5
  • 7

1 Answers1

122

I just got same error. If you are using Angular 9 in your app check version of @angular-devkit/build-angular. I had version 0.1000.0 which I assume is intended for Angular v10. Probably got there by running ncu I just downgraded on 0.9xxx.x and this error message is not showing anymore.

To fix this issue just downgrade angular-devkit/build-angular:

npm install @angular-devkit/build-angular@0.901.9
Michael W. Czechowski
  • 3,366
  • 2
  • 23
  • 50
A. David
  • 1,291
  • 1
  • 8
  • 5
  • 1
    Thanks man! It worked for me. npm install @ angular-devkit / build-angular @ 0.901.9 – René Gustavo Jun 26 '20 at 13:09
  • So what's the workaround for those that want/need to mitigate the `minimist` npm audit vulnerability? – Brad P. Jul 09 '20 at 07:34
  • 1
    Turns out they [angular-cli team] released the same vulnerability fix to the 9-lts branch as well, so one can run `npm install --save-dev @angular-devkit/build-angular@0.901.10` to fix the error from the OP and the `minimist` security vulnerability. – Brad P. Jul 09 '20 at 07:42
  • I have the following. "@angular-devkit/architect": "^0.1000.4", "@angular-devkit/build-angular": "^0.1000.4", Does it means also the @angular-devkit/architect should be downgraded? – Louie Miranda Jul 28 '20 at 01:35
  • @Louie Miranda Yes, @angular-devkit/build-angular to ~0.901.12 and @angular-devkit/architect to ~0.901.12 – Mike Aug 06 '20 at 06:22
  • It is a know bug with npm cli: https://github.com/npm/cli/issues/726 – Søren Falch Aug 14 '20 at 10:58
  • Find latest @angular-devkit/build-angular package here: https://www.npmjs.com/package/@angular-devkit/build-angular?activeTab=versions – Søren Falch Aug 14 '20 at 11:21
  • It's strange - I had a working project that was throwing errors during publishing. I decided to rebuild it from scratch with the same package.json file. It was using 0.1001.7. But then I got this error when I ran it. Changing the build as suggested fixed it, but how was it working before? – drunkenwagoner Oct 22 '20 at 13:45