"Cannot download @types/node: No @types/node versions available"

I've just upgraded my expired EAP to the current RC1, and for the same project, WebStorm now gives this error on startup:

> Cannot download @types/node: No @types/node versions available

There's nothing else in the Event Log.

tsconfig.json includes

"types": ["node", "jest"],

and tsc compiles fine.

6
13 comments

Hi Dan,

please could you share your idea.log + a screenshot of Settings | Languages & Frameworks | Node.js and NPM page?

0
Avatar
Permanently deleted user

Dan Dascalescu did you solve this problem? I'm experiencing the same issue on Webstorm 2021.1. Never seen this before on previous versions.

Here's an excerpt from my log:

2021-04-10 09:44:47,482 [  20117]   WARN - re.NodeCoreLibraryConfigurator - Cannot download @types/node 
java.util.concurrent.ExecutionException: java.lang.RuntimeException: No @types/node versions available
at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
at com.intellij.javascript.nodejs.library.core.NodeCoreLibraryConfigurator.configure(NodeCoreLibraryConfigurator.java:116)
at com.intellij.javascript.nodejs.library.core.NodeCoreLibraryConfigurator$1.run(NodeCoreLibraryConfigurator.java:240)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:998)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsync$5(CoreProgressManager.java:497)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:228)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:178)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:688)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:634)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:64)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:165)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:228)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1700)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: No @types/node versions available
at com.intellij.javascript.nodejs.library.core.NodeTypingsDownloadSession.findTypingsVersion(NodeTypingsDownloadSession.java:51)
at com.intellij.javascript.nodejs.library.core.NodeTypingsDownloadSession.lambda$start$0(NodeTypingsDownloadSession.java:27)
... 8 more

WebStorm 2021.1
Build #WS-211.6693.108, built on April 5, 2021
Runtime version: 11.0.10+9-b1341.35 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.2.3
GC: ParNew, ConcurrentMarkSweep
Memory: 1981M
Cores: 8
Non-Bundled Plugins: de.docs_as_co.intellij.plugin.diagramsnet (0.1.5), com.intellij.database (211.6693.108)

0

Please make sure that there are no issues with internet connection; in particular, check that http://registry.npmjs.org is accessible

 

0

Can the registry be configured to use a different url? 

0
Avatar
Permanently deleted user

That reminds me, the problem went away recently when I updated all my dependencies to their latest (major) versions via yarn. Still no idea what caused it, but haven't seen it since.

0

>can the registry be configured to use a different url? 

no, it can't:(

0

Is there no way to manually install the @types/node package from a file? This is extremely critical for offline development. In other cases, such as IDE plugins, an option is provided to install from file.

0

You can install the typings in your project with npm i @types/node

2

The issue for me is that the IDE only connects when it is https://registry.npmjs.org - it does not connect if just http

0
Avatar
Permanently deleted user

@types/node is already in my package.json and i have a fully populated node_modules/@types/node (well since i use pnpm this is a link to a shared folder).

So, AFAICT, node types are working ... 

So, i don't understand this error message, unless it is caused by using http instead of https?

3

Same issue - what's the solve. Annoying popup every time I open IntelliJ

1

Same issue here. IDE complains:

Cannot download @types/node: No @types/node versions available

We have a private registry -- seems like this practice is more and more prevalent, given increased security concerns about open-source libraries and open registries.

Would be very useful to be able to specify the private registry, and have IDEA honor that specification.

Is there an open YouTrack item for this, so I can follow it?

2

Got the same disturbing error message today. I'm working with WSL/Ubuntu. IJ is running on Windows but the code is under WSL.
On a new project, in "Settings | Languages & Frameworks | Node.js", I set Node interpreter property to my WSL Node.js installation and I don't get this message anymore. 

0

Please sign in to leave a comment.