Quantcast
Channel: Node.jsタグが付けられた新着記事 - Qiita
Viewing all articles
Browse latest Browse all 9309

Githubにある自作のnpmモジュールをnpm installしてENOENTなエラーが出た時

$
0
0
はじまり 自分で作ったnpmモジュールをubuntu環境へinstallしようとしたときに以下のエラーが出ました。 log root@ca04e13630cb:/usr/app# npm install git+https://github.com/Landmaster135/FeedFetcher.git npm ERR! code ENOENT npm ERR! syscall spawn git npm ERR! path git npm ERR! errno -2 npm ERR! enoent An unknown git error occurred npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-01-08T17_49_46_172Z-debug-0.log 原因と解消法 僕の場合、gitがubuntu環境に入っていないことが原因だった。 console apt install git-all -y gitを入れた後は、以下の何れのコマンドでもnpm installできた。権限とかpackage.jsonの問題ではなかった。 console npm install git+https://github.com/<user name>/<repo name>.git console npm install git+ssh://git@github.com/<user name>/<repo name>.git console npm install git+ssh://github.com/<user name>/<repo name>.git console npm install https://github.com/<user name>/<repo name> おしまい An unknown git error occurredとは、なんてスパルタな・・・。

Viewing all articles
Browse latest Browse all 9309

Trending Articles