I'm having the same issue using Homestead.
Cannot find module '.\vendor\laravel\elixir\Elixir'
I have a fresh install of laravel/laravel, installed with composer create-project laravel/laravel . dev-develop. I then ran npm install – everything went fine, but when I try to run gulp after that I get Cannot find module '.\vendor\laravel\elixir\Elixir'. How come?
H:\Binary\nginx\foobar.com>gulp
module.js:340
throw err;
^
Error: Cannot find module '.\vendor\laravel\elixir\Elixir'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.<anonymous> (H:\Binary\nginx\foobar.com\Gulpfile.js:1:76)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
laravel/elixir have been installed by Composer.
I am running Windows.
So I guess the composer package laravel/elixir won't be used anymore.
I solved this by changing the first line in Gulpfile.js to var elixir = require('laravel-elixir');, I then updated packages.json with "laravel-elixir": "*",, I then ran npm install again. After that I could run gulp without problem.
Please or to participate in this conversation.