I'm getting this message when I go on my vscode
:
The path ...\node_modules\typescript\lib
doesn't point to a valid tsserver install.
I've no idea what's wrong. Any ideas?
tsconfig:
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"declaration": true,
"baseUrl": "./ts",
"outDir": "js"
},
"exclude": [
"node_modules",
"js"
]
}
Visual Studio Code includes TypeScript language support but does not include the TypeScript compiler, tsc . You will need to install the TypeScript compiler either globally or in your workspace to transpile TypeScript source code to JavaScript ( tsc HelloWorld. ts ). You can test your install by checking the version.
Perhaps you haven't installed typescript
in your project, if so - you can do this by npm install typescript --save-dev
.
And accoring to Visual Studio Code documentation - please check path it's use for typescript.tsdk
, maybe it should look like this:
{
"typescript.tsdk": "./node_modules/typescript/lib"
}
Install the version available in your package.json with the command
npm install -g typescript
Then hit ctrl+shift+p
Enter "Open user settings"
In the user settings copy the path of Typescript bin folder from node modules and assign it to "typescript.lib"
"typescript.tsdk": "D:\SampleFolder\Samplesubfolder\Sampleproject\node_modules\typescript\lib",
Note that the path should be separated by "\"
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