From 3337a4378934dbeca0d2120929325e18ccdaa72c Mon Sep 17 00:00:00 2001 From: Arthur Busser Date: Thu, 25 Jan 2024 14:50:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20`yarn=20prod`=20for=20curr?= =?UTF-8?q?ent=20Angular=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It seems that since the project updated to a newer version of Angular, the production build doesn't work anymore. I tracked the issue down to the `src/environments/environment.prod.ts` file, which wasn't updated to match the `src/environments/environment.ts` file. Before the fix, `yarn prod` fails with this error: ``` ./src/environments/environment.ts:5:11-30 - Error: Should not import the named export 'version' (imported as 'packageJson') from default-exporting module (only default export is available soon) ``` After the fix, `yarn prod` succeeds. --- src/environments/environment.prod.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index 3495ce99c..7e3a0356c 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,4 +1,4 @@ -import * as packageJson from '../../package.json'; +import packageJson from '../../package.json'; export const environment = { name: 'production', production: true,