Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add node options to the angular/cli ng command?

I just installed node.js v14. When I built a Angular 9 package, I get these warnings.

ng build –prod myPackage

(node:14432) Warning: Accessing non-existent property 'lineno' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:14432) Warning: Accessing non-existent property 'column' of module exports inside circular dependency

I wonder how I can use node –trace-warnings to find where is the error thrown.

I am using Angular 9.

like image 407
slic Avatar asked May 07 '26 02:05

slic


1 Answers

As one of the possible options you can correct your package.json in the following way:

{
   "scripts": {
      "build": "node --trace-warnings ./node_modules/@angular/cli/bin/ng build –prod myPackage"
   }
}

See also this.

like image 91
SternK Avatar answered May 09 '26 18:05

SternK



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!