VirtualBoxでnpm installした時に symlinkのエラーが出た時の対応

先日、VirtualBox上で npm install をしたら
EROFS, symlimk うんたら
というエラーが出たので対処した時のメモ

[root@localhost src]# npm install
npm WARN optional dep failed, continuing fsevents@0.2.1
npm ERR! Linux 2.6.32-358.el6.x86_64
npm ERR! argv "node" "/usr/local/bin/npm" "install"
npm ERR! node v0.10.25
npm ERR! npm  v2.11.1
npm ERR! path ../rimraf/bin.js
npm ERR! code EROFS
npm ERR! errno 56

npm ERR! rofs EROFS, symlink '../rimraf/bin.js'
npm ERR! rofs This is most likely not a problem with npm itself
npm ERR! rofs and is related to the file system being read-only.
npm ERR! rofs 
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/src/npm-debug.log

これ。

symlink
npm install の時に –no-bin-links をつければ解決!


[root@localhost src]# npm install --no-bin-links

npm のドキュメントは


The --no-bin-links argument will prevent npm from creating symlinks 
for any binaries the package might contain.

ざっくりと要約
「–no-bin-linksを付けると、npmがsymlinksを作らないようにします。そのかわりそれぞれのモジュールのバイナリがプロジェクトに保存されるよ」
となってる

ではでは

Atsumi3

したいことをします。

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください