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

1.6K
Views
Angular: la configuración no está establecida en el espacio de trabajo

Intento servir mi aplicación Angular con mi configuración específica pero Angular no la reconoce:

 $ ng serve --configuration=fr An unhandled exception occurred: Configuration 'fr' is not set in the workspace. See "/tmp/ng-nyZPjp/angular-errors.log" for further details.

Mi angular.json:

 "configurations": { "fr": { "aot": true, "outputPath": "dist/fr/", "i18nFile": "src/i18n/messages.fr.xlf", "i18nFormat": "xlf", "i18nLocale": "fr", "i18nMissingTranslation": "error", "baseHref": "/fr/" }, "en": { "aot": true, "outputPath": "dist/en/", "i18nFile": "src/i18n/messages.en.xlf", "i18nFormat": "xlf", "i18nLocale": "en", "i18nMissingTranslation": "error", "baseHref": "/en/" }, ...

ng serve --configuration=en funciona perfectamente

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

Tuve el mismo error en Angular con Angular Universal V 12.x y los siguientes códigos en el archivo Angular.json corrigieron mi error (reemplace la sección serve-ssr con los siguientes códigos):

 "serve-ssr": { "builder": "@nguniversal/builders:ssr-dev-server", "options": { "browserTarget": "yourAppName:build", "serverTarget": "yourAppName:server" }, "configurations": { "production": { "browserTarget": "yourAppName:build:production", "serverTarget": "yourAppName:server:production" } } }

Github

over 4 years ago · Santiago Trujillo Report

0

También me enfrenté al mismo problema,

 An unhandled exception occurred: Configuration 'fr' is not set in the workspace. See "/tmp/ng-nyZPjp/angular-errors.log" for further details.

a pesar de que tenía las configuraciones configuradas en servir y compilar.

Mi archivo angular.json era como,

 "configurations": { "fr": { "aot": true, "outputPath": "dist/fr/", "i18nFile": "src/i18n/messages.fr.xlf", "i18nFormat": "xlf", "i18nLocale": "fr", "i18nMissingTranslation": "error", "baseHref": "/fr/" }, "en": { "aot": true, "outputPath": "dist/en/", "i18nFile": "src/i18n/messages.en.xlf", "i18nFormat": "xlf", "i18nLocale": "en", "i18nMissingTranslation": "error", "baseHref": "/en/" }, . . . . . . . . "serve": { "configurations": { "en": { "browserTarget": "custom-reports:build:en" }, "fr": { "browserTarget": "custom-reports:build:fr" } }, },

y todavía tengo problema.

Lo solucione cambiando el orden de la configuración y solucionado.

mi angular.json después del cambio

 "configurations": { "en": { "aot": true, "outputPath": "dist/en/", "i18nFile": "src/i18n/messages.en.xlf", "i18nFormat": "xlf", "i18nLocale": "en", "i18nMissingTranslation": "error", "baseHref": "/en/" }, "fr": { "aot": true, "outputPath": "dist/fr/", "i18nFile": "src/i18n/messages.fr.xlf", "i18nFormat": "xlf", "i18nLocale": "fr", "i18nMissingTranslation": "error", "baseHref": "/fr/" }, . . . . . . . . "serve": { "configurations": { "en": { "browserTarget": "custom-reports:build:en" }, "fr": { "browserTarget": "custom-reports:build:fr" } }, },

y esto funcionó para mí.

over 4 years ago · Santiago Trujillo Report

0

En Angular 11, debe colocar la propiedad browserTarget dentro de las configurations (que se encuentra en serve en el archivo angular.json ):

 "serve": { "configurations": { "fr": { "browserTarget": "custom-reports:build:fr" }, }, },
over 4 years ago · Santiago Trujillo Report

0

El error que está recibiendo se debe a que no lo agregó a la configuración de destino del navegador de su servicio:

 "serve":{ "fr": { "browserTarget": "custom-reports:build:fr" }, }
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!