Typescript not working

Hi,

I'm using WebStorm 2023.1.4.

In a new project, I added a typescript file, and a tsconfig.json file which looks like:

{
"compilerOptions": {
"module": "commonjs",
"target": "es5",
"sourceMap": true
},
"include": [
"*.ts"
],
"exclude": [
"node_modules"
]
}

when clicking on the 'Typescript' button at the status bar I get only the 'configure' option (no 'compile' option)

see attached images.

I'm aiming for a client-side TS project.

Thanks.

 

0
4 comments

Please try specifying a full path to node.js executable in the Node interpreter field, node can't be found in your PATH

0

Thanks Eleba.

Like I said, I'm aiming for a client-side project, so haven't installed Node on my machine. Is this installation required for working with TS?

0

yes, the Typescript language service is a Node.js application, it required a node.js interpreter to run

0

Thanks, indeed adding node to the project solved the problem.

0

Please sign in to leave a comment.