user6269864
user6269864

Reputation:

"deprecations must be strings" error when publishing package to NPM

I am trying to publish a package using npm publish and this is what I got:

npm ERR! publish Failed PUT 400

npm ERR! code E400

npm ERR! deprecations must be strings : async-csv

npm ERR! A complete log of this run can be found in:

npm ERR! C:\Users\user1\AppData\Roaming\npm-cache_logs\2018-03-13T12_05_57_949Z-debug.log

I could not find a description of this error elsewhere. What does it mean?

Upvotes: 5

Views: 1819

Answers (2)

Zeptar
Zeptar

Reputation: 97

The error will occur if you are trying to publish the same version twice, or a version that is lower than the existing version. For example, if your last version was 1.0.1, and you are trying to publish as 1.0.0, it will make this error.

Upvotes: 1

user6269864
user6269864

Reputation:

Found it. The error occurred because I was trying to publish the package without increasing the package version number in package.json.

Open the package.json, increase the version number and publish again.

Upvotes: 5

Related Questions