3

I'm trying to install React through command prompt. NodeJS is already installed.

When I try to run this command:

npm i -g create-react-app 

It is displaying error as shown below:

npm ERR! code ENOVERSIONS npm ERR! No valid versions available for undefined npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\xyz\AppData\Roaming\npm-cache\_logs\2019-12-10T10_51_39_2222-debug.log 

6 Answers 6

4

Sometimes this can happen when you are using a private NPM registry / proxy registry and it has corrupted metadata. I've seen this happen with Sonatype Nexus 3 - there were corresponding error messages in the server logs.

Sign up to request clarification or add additional context in comments.

Comments

1

I had this issue this morning, and my solution was to click on the log file.

It showed me this:

2992 verbose type range 2993 verbose stack Error: No valid versions available for undefined 2993 verbose stack at pickManifest (C:\Program Files\choco\nodejs-14\14.17.1.2108041435\node_modules\npm\node_modules\npm-pick-manifest\index.js:39:11) 2993 verbose stack ...etc... 

So, I opened the file which threw the exception:

C:\Program Files\choco\nodejs-14\14.17.1.2108041435\node_modules\npm\node_modules\npm-pick-manifest\index.js

and changed line 39 from:

err = new Error(`No valid versions available for ${packument.name}`) 

to

err = new Error(`No valid versions available for ${JSON.stringify(packument)}`) 

I then re-ran "npm install", and this time, it showed the cause of the problem (I've split the one line into several lines, for readability):

npm ERR! No valid versions available for { "dist-tags":{}, "versions":{}, "success":false, "time":{ "created":"2023-05-15T20:42:01.119Z", "modified":"2023-05-15T20:48:12.712Z" }, "error":"Failed to stream response due to: Missing blob for crypto-js. Unable to check remote crypto-js for retrieving latest copy.", "_cached":true, "_contentLength":0 } 

So, this shows me that the cause of the problem is the package:

"crypto-js": "^4.1.1", 

So, I needed to grab one of the valid versions from:

https://www.npmjs.com/package/crypto-js?activeTab=versions

You can also see why the error message was so hopeless.

Error: No valid versions available for undefined 

Line 39 was attempting to display "name" from this error record, but there was no such field.

Comments

0

Are you sure you have the right Node version? Try updating NodeJS or try running: npx create-react-app my-app

1 Comment

The issue was resolved. When I tried to run the same command again next day it was working fine. Maybe some issue with npm or node.
0

For me this error came up because I had a version number that did not exist for a package I wanted.

Comments

0

My issue was similar to yours:

14.93 npm error code ENOVERSIONS 14.93 npm error No versions available for @anycompany/middleware-utils-log 14.94 npm error A complete log of this run can be found in: /root/.npm/_logs/2025-12-02T19_17_10_990Z-debug-0.log 

Anyone still having issues like this should check deep down the package dependencies you are using.
I am talking dependencies of dependencies of... and so on.
This is why you should clear all node_modules and package-locks involved, then install dependencies again, it is the fastest way to fix.
This is not related to cache or node versions.

Comments

-1

you should check this out issue.

If the problem still exist, please check your versions with this:

npm -v node -v 

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.