yarn install でwebpack等をインストールするとwindows環境ではシンボリックリンクのエラーが出てwebpackが正常にインストールできません。
error An unexpected error occurred: "EPROTO: protocol error, symlink '../../../node_modules/acorn/bin/acorn' -> '/home/vagrant/project_dir/node_modules/.bin/acorn'".
bin/webpackは自体は作成されていますが
実行すると: No such file or directory
となります。
同一の方法でMac環境であれば問題なくインストールに成功します。
やったこと
以下のサイト関連を飛びあさって共有フォルダ外にnode_modulesを作成してmount --bind
すると
いいとあったので試したのですが駄目でした。
https://github.com/hashicorp/vagrant/issues/6188#issuecomment-137403340
https://twitter.com/search?f=tweets&q=windows%20vagrant%20node&src=typd
1.yarn install時にnode_modulesのパスを指定する。
yarn install --modules-folder ../node_modules
を実行する
↓
/home/vagrant/node_modules ⇒ /home/vagrant/project_dir/node_modules/
にマウントする。(逆パターンも試しました)
2.project_dir内にnode_modules自体を作成しない
yarn install --modules-folder ../../node_modules
を実行する
↓
/home/node_modules/ ⇒ /home/vagrant/node_modules/
にマウントする。
ゲストOS直下/var/www
配下にproject_dirを作成すれば問題なく環境は作れるのですがsftp等で同期させてやらないといけないのでこの方法はやりたくありません。
windows環境でやるのはかなり辛そうですがやらないといけないのでどうにかしたいと思っています。
みなさんの力をお貸しください。
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/29 12:27
2018/03/29 12:32
2018/03/29 12:32
2018/03/29 12:35
2018/03/29 13:05