Menu

how do you pick an npm package name
📰

how do you pick an npm package name

DEV Community: node·TheOmniKit·about 7 hours ago
#vCwF8fWO
#devtonodejs#devto#dev#name#package
Long article (259 words) — no AI summary yet.
Reading 0:00
15s threshold

okay so quick question for people who publish packages, how do you check a name before you create the repo and everything. because the worst way to find out is folder named, readme written, then npm says no.

the rules are not hard just easy to forget. lower case only for a new package, max 214 characters, cannot start with a dot or an underscore, only url friendly characters so "hello world" is out, and a core module name like http is refused for new ones too. the funny part is My-App with capitals is still allowed for an old package, because the rules came later and npm didn't break the old ones. so a name can be fine for old, not fine for new.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.