Iñigo
Iñigo

Reputation: 2016

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

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.json

Any idea on how to solve this error? Thanks!

Upvotes: 0

Views: 2282

Answers (1)

TPReal
TPReal

Reputation: 1585

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.

Upvotes: 4

Related Questions