Open the folder you create with ng new and open the package.json
file. In devDependencies
change the version of “jasmine-core” 3.6.0
to 3.8.0
and “karma-jasmine-html-reporter” from 1.7.0
to 1.6.0
and save it. Then go back to Terminal and go to your project and run npm install
. Now it works and you can run ng serve
.
Edit 2021
"jasmine-core": "~3.8.0",
"karma-jasmine-html-reporter": "^1.7.0"