laravel docker npm install 错误的解决方法

https://segmentfault.com/a/1190000004444283
https://github.com/JeffreyWay/laravel-mix/issues/533

折腾了几个小时,终于解决了,操作如下

 17  mv node_modules /node_modules
   18  ln -s /node_modules node_modules
   19  yarn
   20  cd node_modules
   21  ll
   22  cd ..
   23  ll
   24  yarn
   25  node -v
   26  yarn run dev
   27  npm i -g cross-env
   28  yarn run dev
   29  npm i webpack.mix
   30  npm run dev
   31  ll node_modules
   32  cd node_modules
   33  ll
   34  cd ..
   35  cp -fR /node_modules .
   36  rm node_modules
   37  ll
   38  cp -fR /node_modules .
   39  npm run dev

你可能感兴趣的:(laravel docker npm install 错误的解决方法)