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)
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 thesrc/environments/environment.ts
file.Before the fix,
yarn prod
fails with this error:After the fix,
yarn prod
succeeds.