I have scaffolded AspNetCore Angular 6.0 SPA template
from cli
and then installed npm
package accordingly.
However when i try to run the project dotnet run
it does not start rather prompted with and error. I have captured a screenshot for your reference. I am not sure whether it is something to do with angular.Json
file or else!!! Any idea..
Error:
Unknown option --extractCss
This is because the ng serve
command no longer supports --extractCss
option
Open package.json
. You'll find
{
"scripts": {
"start": "ng serve --extract-css" // Please remove the --extract-css
// ...
}
}
remove the --extract-css
from start
scripts.
It'll be now
{
"scripts": {
"start": "ng serve"
// ...
}
}
Now open angular.json
. set "extractCss": true
in build
configuration
example:
"build": {
"architect": {
"configurations": {
"extractCss": true,
//...
}
}
}
}
Reference: https://github.com/angular/angular-cli/issues/10666#issuecomment-386843570
Reference 2: http://www.talkingdotnet.com/upgrade-angular-5-app-angular-6-visual-studio-2017/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With