Why is NPM package name is limited to 214 characters?

Viewed 194
1 Answers

It was originally set to 50 characters, but was increased to 128 characters, and then to 214 to match the longest name used for a package available at the time.

From Github issues:

This turned out to be a bit of a voyage of exploration for the npm team, but we've determined that the previous maximum length for packages (including scopes) was too short at 50 characters, and have bumped it up to 214 characters (as that was the longest package name previously in existence). If you try to publish your package now, it should succeed, and we're going to try to be clearer in the future about the restrictions on package names so this is less confusing. Thanks for bringing this to our attention!

Related