I'm using Homestead on a Windows 10 machine and had some problems when I started to try to use laravel-mix in a laravel project, so I decided to follow the installation instructions for a stand-alone project to see what happens. From the installation.md file:
mkdir testmix && cd testmix
npm init -y
npm install laravel-mix --save-dev
cp -r node_modules/laravel-mix/setup/webpack.mix.js ./
However, when I execute those commands, although a lot of stuff is installed under node_modules, there is no laravel-mix under the node_modules directory and the node_modules/.bin directory is empty. Here's what I see:
vagrant@homestead:~/code/testmix$ sudo npm install laravel-mix --save-dev
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! path ../acorn/bin/acorn
npm ERR! code EPROTO
npm ERR! errno -71
npm ERR! syscall symlink
npm ERR! EPROTO: protocol error, symlink '../acorn/bin/acorn' -> '/home/vagrant/code/testmix/node_modules/.bin/acorn'
npm ERR! A complete log of this run can be found in:
npm ERR! /home/vagrant/.npm/_logs/2017-12-20T15_41_36_456Z-debug.log
vagrant@homestead:~/code/testmix$ cp -r node_modules/laravel-mix/setup/webpack.mix.js ./
cp: cannot stat 'node_modules/laravel-mix/setup/webpack.mix.js': No such file or directory
vagrant@homestead:~/code/testmix$
I don't know what is going on here.