Patryk Janik
Patryk Janik

Reputation: 2623

Npm doesn't see the newest npm package version

Hay,

I have some big problems with sub-dependencies.

I have react-test-renderer package which uses react-is package.

And the problem starts here. Because of react-is want to be installed on version 16.3.1

But when I want to install only "[email protected]" then npm tells me that package version is not existing: npm install error message

Also tried "npm view react-is" command to view if that version already exist: npm view react-is versions

The funniest thing is that, when I go to the npmjs.com page and look for the react-is version, there is a version 16.3.1 published 8h ago:

enter image description here

And When I type npm install command I got an error about not existing react-is version: npm install errors

When I use yarn install then I can simply choose the existing version and everything works correctly: yarn install choose

But I can't use yarn on the production and I need to solve it somehow by using npm.

Maybe have you some idea, how should I solve this?

Upvotes: 7

Views: 6961

Answers (4)

Jammar
Jammar

Reputation: 446

I had a similar problem and found out through npm info x that npm-package x was not showing the expected latest version. I then found out that I had an .npmrc custom registry config that messed that up. Removing it, installing the package, and then using the .npmrc again solved the problem for me.

Upvotes: 0

brome40
brome40

Reputation: 51

I also had this issue. I could see the latest version of my package correctly published but every attempt to npm install failed. For me the solution was to clear the cache using npm cache clean --force after which npm install worked. Hope this helps anyone else having same issue

Upvotes: 5

Mario Battaglia
Mario Battaglia

Reputation: 21

I was having the same issue and then I found out I had a custom repository in the .npmrc file. Deleting it solved the issue.

Upvotes: 2

I have the same bug right now. Just try to upgrade your version one more time (in your case to 16.13.2). This should solve the problem. Maybe something is going wrong during package publication with npm publish

Upvotes: 2

Related Questions