Potential bug when upgrading to Angular 7 and Typescript 3.2.0. Using IntelliJ.
TS2304: Cannot find name 'JSON'

Deleting node_modules and npm install seems to have fixed it.
Even after deleting node modules and then doing npm install, the error persists.

Same for me. Reinstall with npm doesn't work.
I just hit this too for a new project. I have another project that works, but I am running code-server with typescript 3.4.4 building with webpack for node 8. So there are a lot of moving parts. I am going to try to break it down and see if there is rhyme or reason. I see this reported on other projects, and usually, the solution for some people involves a mixture of tsconfig.json tweaks to the library target and installing specific @type/ packages. There doesn't seem to be consistency though, so I think it is a tooling configuration problem.
I'm hitting the same issue as @geiseri
I also see Cannot find name 'document'. Do you need to change your target library? Try changing thelibcompiler option to include 'dom'.ts(2584) even when my lib entry in tsconfig.json includes dom
I fixed this on an es5 project by adding "es5" to tsconfig.json at compilerOptions.lib:
{
"files": [
"src/index.ts"
],
"compilerOptions": {
"target": "es5",
"module": "es2015",
"lib": [
"es5",
"dom"
]
}
}
Most helpful comment
I fixed this on an es5 project by adding
"es5"totsconfig.jsonatcompilerOptions.lib: