Umakant Patil
Umakant Patil

Reputation: 2308

NPM registry not updated

I have created npm package for my the project. I have pushed its next version and committed in github.

After that. I executed

npm publish

in the project directory. But I see my NPM registry page has not updated README / LICENSE / VERSION.

When I execute

npm install packagename

It does install latest version but I'm worried about outdated README and VERSION displayed on NPM Registry.

How can I get it updated?

Link for package I'm expecting to update:- https://npmjs.org/package/jsmart

Upvotes: 3

Views: 4160

Answers (4)

Carlos
Carlos

Reputation: 703

For me I had 2 package.json files. One in the root of my project and another in a ./packages folder. I updated the version to both be the same and performed a git commit/push

git commit -a

git push

and npm publish

npm publish

Upvotes: 0

Do-do-new
Do-do-new

Reputation: 992

Another reason can be inconsistencies in your package.json compared to the previous versions - such as different package name.

(it happened to me when e.g. publishing packages generated with swagger)

Upvotes: 0

ismnoiet
ismnoiet

Reputation: 4169

Try to add a suffix for the current version of the package example : let's say the current version of your package is 1.0.0,

you have two options :

option1:

change the version manually,change it to something line 1.0.1 and then publish it by using the command :

npm publish

note : In this case you may get an error saying that your github repo is not clean (due to the manual updating), so it is better to use the second option

option2:

change the version automatically.Type in your terminal:

npm version patch 

to change just the last number(in this case the last 0 and increment it by 1). Now you are ready to publish the new version of the package, so type in the terminal :

npm publish

and that's it

Upvotes: 0

Umakant Patil
Umakant Patil

Reputation: 2308

Today I can see package is updated. I think it does take some time to clear the cache/update with new values.

Upvotes: 2

Related Questions