0

Trying to compile an Angular project in Visual Studio Code with ng build and serve it with ng serve

In both cases got the following error:

Only 'amd' and 'system' modules are supported alongside --outFile

Error

Didn't use --outFile option for compiling and serving so don't really know where the error is.

Also tried to remove "module": "commonjs" from tsconfig.spec.json as mentioned here but still not working.

  • tsConfig.spec.json

tsConfig.json

Any idea on how to solve this error? Thanks!

Iñigo
  • 1,877
  • 7
  • 25
  • 55

1 Answers1

4

Your configuration includes "outFile": "./dist/out-tsc/app/build.js" which is equivalent to the --outFile flag. Remove this line from the configuration and rely on the outDir only.

TPReal
  • 1,539
  • 12
  • 26