npm publishをする前の前提を確認してみます。 npm publish前に確認すること 1. git status gitにコミットしてないファイルがないか。 npm publishはgitの結果ではなく現在のファイルを公開するので、commitにファイルを変更していたらそれが公開されてしまいます。 2. git fetch リモートレポジトリの方が進んでいないか。 3. node_modulesを削除しnpm installを実行 最新の依存関係で動作するか。 4. npm test テストが通るか 5. バージョンを上げ、git tagを作成 npm versionを実行すると、タグ付けとコミットを自動で行います。 基本的にセマンティックバージョニングに従います。 いきなりメジャーバージョンを付加することは稀なので、はじめはnpm version minorを実行しましょう。