LoginSignup
4
4

More than 5 years have passed since last update.

WindowsのVMでnpm install時にモジュールのパスが255文字を超えてしまう場合

Last updated at Posted at 2015-02-12

Windowsで、CentOSだとかUbuntuのVMをVagrantでよく動かしています。
というか、最近の作業はほとんどそれ。

そこで問題になったのは、WindowsOSとVMとの共通領域(ex:/vagrant)に
npmのローカルインストールを行う際、モジュールのパスが255文字を超えてしまって、
protocolエラーが発生してしまうというもの。

これを回避するには、ひとまずWindowsOSから切り離されたVM上のパス(ex:/home/xxx)で
npm installし、それを上記/vagrant等の場所にリンクを貼るといいのではないでしょうか。

ただし、WindowsOS上のパスにLinuxのリンクを貼る場合、
管理者権限でVMを起動する必要があるようなので、そこのところだけ注意してください。
※管理者権限でコマンドプロンプトを実行して、vagrant upですね。

4
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
4
4