After spending nearly 5 hours scouring the internet for a solution, I am still unable to resolve this persistent issue. The responses I've found so far do not seem to address the specific problem I'm facing.
Although I have upgraded the tsc
version to the latest version 3.7.3
, the problem persists on visual studio 2017 community.
Upon inspection, the typescript.d.ts
file located in node_modules/typescript/lib/
is showing over 3347 errors in visual studio. However, I discovered that not all errors are TS1005
; there are also instances of TS2307
, TS2304
, and others, all pointing to the same file.
Various errors keep occurring on different parts of the page, such as:
Error 1005:
Error TS1005(TS) '(' expected. Location: Property\node_modules\typescript\lib\typescript.d.ts
Error 2304:
TS2304 (TS) Cannot find name 'FileReference'. Property\node_modules\typescript\lib\typescript.d.ts 4960
I'm at a loss as to what I might be doing incorrectly here.
Below is an excerpt from my tsconfig.json file:
{
"compilerOptions": {
"noImplicitAny": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"module": "es6",
"target": "es5",
"jsx": "react",
"allowJs": true,
"outDir": "./wwwroot/_compiled",
"moduleResolution": "node",
"typeRoots": [ "node_modules/@types" ]
},
"exclude": [
"wwwroot/dist",
"node_modules"
]
}