TypeScript @types/node

I installed `npm i @types/node`

But webstorm can not resolve it.

After I install `typings install node --source dt --global` it works

But I think it should work only with `npm i @types/node`, is it possible to tune it?

9 comments

@types are supported since WebStorm 2016.2 (https://youtrack.jetbrains.com/issue/WEB-22039). What build do you use?

0

I have similar issues even in 2016.3 EAP. I'll try to create a minimal example to reproduce the issue.

0

sample project would be helpful. Thanks in advance!

0

 

Hi,

we're encountering the same issue with PhpStorm 2016.3.1

Build # PS-163.9735.1

 

typings are installed via @types:

"@types/jasmine": "2.5.41"

 

but it cannot detect the global types and functions.

but installing the types via using the old typings install works though

0

what error do you see? Do you have typescript service enabled? project that shows up the issue would be helpful

0


This is the error that I'm getting.

The curious thing is that this is only happening on our larger typescript applications, but not on the smaller ones we have

0

Right now, our current work-around is adding these at the top of our typescript files that need global definition from the @types folder:

/// <reference types="jasmine" />

but we would still need a proper fix for the @types definition file detection

0

I have the same problem, is there any way to fix this?

0

WebStorm does properly detect types from @types. What WebStorm version do you use? Do you have tsconfig.json file(s) in your project?

Project that shows up the issue would be helpful

0

Please sign in to leave a comment.