Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I named three developer tools. All three names were taken on npm

Описание и применение

При публикации CLI‑инструментов с короткими именами автор обнаружил, что npm‑пакеты с такими именами уже существуют. Это привело к тому, что команды npx bridle lint запускали чужой пакет, а не локальный инструмент. Решением стало явное указание источника из GitHub в README и проверка наличия бинарника в чистой среде.

Задача

Installing a local tool via npx with a bare npm name caused unintended execution of a third‑party package.

Результат

The author avoided accidental execution of unrelated packages by explicitly installing from GitHub and verifying the binary, preventing future install‑instruction failures on clean machines.

Рабочий процесс

  • 1. Check npm registry for desired name before publishing.
  • 2. Write README install instructions using npm install -g github:org/repo to avoid registry lookup.
  • 3. Verify local binary exists by running ./node_modules/.bin/bridle --version in a fresh environment.

Доказательства

All three taken. Not squatted — real packages, by real people:

Источник

Six commands in that README would have run a stranger's websocket library on the machine of anyone following my own documentation.

Источник

Install explicitly from the repo, then use the short command: npm install -g github:manpreet171/bridle bridle lint

Источник

  • Дата записи: 2026-10-05T11:40:47.935Z