Encountering an issue while trying to compile an Angular project in Visual Studio Code using ng build
and then serving it with ng serve
Unfortunately, faced the following error message in both cases:
The error 'Only 'amd' and 'system' modules are supported alongside --outFile'
https://i.stack.imgur.com/29P4d.png
After consulting resources online, realized that not using the --outFile option made it difficult to pinpoint the origin of the error.
Even after attempting to follow suggestions such as removing "module": "commonjs"
from tsconfig.spec.json, as suggested here, the issue remained unresolved.
- tsConfig.spec.json
https://i.stack.imgur.com/4xRfY.png
Any suggestions or insights on how to troubleshoot and resolve this error would be greatly appreciated. Thank you!