Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

663
Views
angular-cli build works, build --prod fails

I am working on an Angular 4 project that utilizes angular-cli. It is finally almost done -- and yet another stumbling block.

If I run ng build the project builds fine.

If I run ng build --prod the following error is thrown:

ERROR in Error encountered resolving symbol values statically. Calling function 'makeDecorator', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function, resolving symbol Injectable in C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/metadata.d.ts, resolving symbol OpaqueToken in C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/opaque_token.d.ts, resolving symbol OpaqueToken in C:/SRC/Sandbox/eat-sleep-code.com/node_modules/ng2-gist/node_modules/@angular/core/src/di/opaque_token.d.ts

ERROR in ./src/main.ts Module not found: Error: Can't resolve './$$_gendir/app/app.module.ngfactory' in 'C:\SRC\Sandbox\eat-sleep-code.com\src' @ ./src/main.ts 4:0-74 @ multi ./src/main.ts

How do I get around this?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Angular library should not contain node_modules. It will raise unpredictable errors.

I would advice you to create your own copy ng2Gist directive in your project because it is very simple directive

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!