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

962
Visualizações
Uncaught SyntaxError: Strict mode code may not include a with statement

I have recently updated to Angular v9 and I am getting the following error:

Uncaught SyntaxError: Strict mode code may not include a with statement

This is occuring in the following file:

./node_modules/@angular/animations/__ivy_ngcc__/fesm2015/animations.js

This is an Angular v9 file as per the comments in the file:

/** * @license Angular v9.0.0 * (c) 2010-2020 Google LLC. https://angular.io/ * License: MIT */

This is occuring here, with the with statement:

module.exports = {
  Window_run: function _run(code, file) {
    if (file) code += '\n//@ sourceURL=' + file;
    with(this) eval(code);
  },

There is a comment above this line:

/* Domino uses sloppy-mode features (in particular, with) for a few * minor things. This file encapsulates all the sloppiness; every * other module should be strict. / / jshint strict: false / / jshint evil: true / / jshint -W085 */

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

I removed this line export { renderModule, renderModuleFactory } from '@angular/platform-server'; as suggested here and here but the issue occures only when I add ServerModule to imports array

@NgModule({
  imports: [/*AppModule,*/ ServerModule],
  //  bootstrap: [AppComponent],
})
export class AppServerModule {}
// export { renderModule, renderModuleFactory } from '@angular/platform-server';

when removing ServerModule the build executed successfully

over 4 years ago · Santiago Trujillo Relatório

0

I was searching for the solution to a similar problem. Upgrade to Angular 9 broke my app. After a lot of trial and error this helped me.

Just comment out or remove the following line from main.ts (added by the upgrade process):

export { renderModule, renderModuleFactory } from '@angular/platform-server';
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