I named three developer tools. All three names were taken on npm.
I shipped three small tools over about a week. Bridle , Interlock , Slopguard . I was pleased with the names — short, metaphors that explain the mechanism, not a vowel-dropped startup pun among them. Then, quite late, I checked the npm registry. $ for p in bridle interlock slopguard ; do curl -s -o /dev/null -w "%{http_code} $p \n " https://registry.npmjs.org/ $p done 200 bridle 200 interlock 200…
Three developer tools were named: Bridle, Interlock, and Slopguard. Initially, the names were chosen and seemed appropriate. However, upon checking the npm registry, it was discovered that all three names were already taken by other packages. The first two tools, Bridle and Interlock, belong to real people and serve distinct purposes.
The third tool, Slopguard, shares similarities with one of the author's tools. The issue arose when using the npx command in the README files to install and run the tools. The command npx github:user/repo was used, but it did not install the tools properly. Instead, it fetched and ran a different package from the npm registry, specifically the one with the same name as the author's tool.
This led to unintended consequences, as the wrong code was executed on users' machines. The lesson learned is to check the availability of names in the npm registry before naming tools and to be explicit about the source of the tools in the README files. It is also recommended to install the tools directly from the repository rather than relying on the bare npm name, as it may lead to unexpected results.
The author suggests testing the installation instructions on a different machine to ensure they work as intended.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.