I\'m building my first Angular Application. I\'m creating a new Angular application using this command ng new purchase-section. But when I executing the application
I was facing the same issue while developing an angular6 project. I spent more time finally it's working for me.
Here is the solution:
Open "package.json"
rxjs and "TypeScript" verstion like below screenshot
Change like the below screenshot:
Next go to your project folder and delete "node_modules" folder.
After delete, next run npm install in your project folder
Finally run ng serve. It should work (I tried 3 projects and confirmed).
In your Package.json file remove ^ symbol (caret) from "rxjs": "^6.0.0" and add "rxjs": "6.0.0" it will work fine.
These two changes what you want:
// in package.json:
"rxjs": "^6.2.2" ==> "rxjs": "latest"
"typescript": "2.7.2" ==> "typescript": "2.8"
where ==> means to replace
I changed the version for rxjs and typescript. My package.json has the following entries:
"typescript": "^2.7.2"
"rxjs": "^6.3.3",
I also had to upgrade angular cli.
I have tried all the other answers. But I found issue. I had ts lint plugin installed which forced file to be ended without space. I removed it and it is working.
You can also remove the space going to that specific file.
Just change the TypeScript dependency version to ^2.8