Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

970
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda