Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

664
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda