LoginSignup
6
4

More than 5 years have passed since last update.

npmインストールでエラーが出たら

Posted at

module.js:339
    throw err;
    ^
Error: Cannot find module 'semver'
  • 上記のようなエラーが出たとき、macPCでhomebrewを使っている場合は、次のようにすれば解決できる場合が多いです。
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf ~/.npm
brew uninstall --force node
brew uninstall --ignore-dependencies node
brew uninstall --force node
brew install node
6
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
4