Seeing a strange error message when building an Angular 17 site when aot is enabled. When aot is disabled the site builds without issue.
The error message identifies a line in one of our own custom npm libraries which the site consumes.
[ERROR] Expected ";" but found "-"
node_modules/@mycompany/angular-common/fesm2022/angular-common-library.mjs:1776:16:
1776 │ let tmp_4_-1;
I understand that there is some particular syntax being used in the dependency which the aot compiler does not like, but I cannot seem to find the actual offending line in the file referenced. Line 1776 does not remotely resemble this. I have even gone through the mjs file and removed every line that ends in -1; and the error persists.
Is there any way to see the actual file in memory that ng build is working with when it encounters this syntax issue? Even if I could just see a bit more context of the lines around this one I might be able to identify the issue, but as it stands this message tells me nothing about where the error actually originates.
Don't really need aot on this site, so disabling it is a viable option in this case, but would still like to know what the problem here is.
"strictMetadataEmit" : true?"angularCompilerOptions": { "enableI18nLegacyMessageIdFormat": false, "strictInjectionParameters": true, "strictInputAccessModifiers": true, "strictTemplates": true, "strictMetadataEmit": true }