I get the following error when running gulp after a new install of Laravel
module.js:340
throw err;
^
Error: Cannot find module 'vinyl'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:289:25)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (C:\Users\jimmy\AppData\Roaming\npm\node_modules\gulp\node_modules\ gulp-util\index.js:2:9)
at Module._compile (module.js:425:26)
at Object.Module._extensions..js (module.js:432:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:313:12)
at Module.require (module.js:366:17)
Hey, I was using the latest version of node, and had problems... now I'm using stable version again.
I ran npm install gulp -g again after install, and the gulp from my root and now i get following error...
(and I've ran npm install from root)
[16:45:16] Using gulpfile P:\Code\PHP\Domains\tonyspizzeria.uk\gulpfile.js
[16:45:16] Starting 'default'...
[16:45:16] Starting 'sass'...
[16:45:16] 'sass' errored after 25 ms
[16:45:16] Error: The `libsass` binding was not found in P:\Code\PHP\Domains\tonyspizzeria.uk\node_modules\node- sass\vendor\win32-x64-46\binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.
at Object.sass.getBinaryPath (P:\Code\PHP\Domains\tonyspizzeria.uk\node_modules\node-sass\lib\extensions.js:158:11)
at Object.<anonymous> (P:\Code\PHP\Domains\tonyspizzeria.uk\node_modules\node-sass\lib\index.js:16:36)
at Module._compile (module.js:435:26)
at Object.Module._extensions..js (module.js:442:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:311:12)
at Module.require (module.js:366:17)
at require (module.js:385:17)
at Object.<anonymous> (P:\Code\PHP\Domains\tonyspizzeria.uk\node_modules\gulp-sass\index.js:176:21)
at Module._compile (module.js:435:26)
[16:45:16] Error in plugin 'run-sequence'
Message:
An error occured in task 'sass'.
[16:45:16] Finished 'default' after 34 ms
@jimmyhowe How did you start your new installation of laravel? I just tried one and it works! can you try to remove your node_modules folder and run npm install
//check versions
npm -v
node -v
gulp -version
Here are mine:
OSX 10.11
Laravel Framework version 5.1.24 (LTS)
npm -v
3.3.6
node -v
v5.0.0
gulp -version
CLI version 3.9.0
I am also trying to run gulp in my virtual machine. I am using windows 8.1 for my virtual machine.
This is the current version installed for my project
vagrant@homestead:~/sites/laravel5$ php artisan --version
Laravel Framework version 5.2.22
vagrant@homestead:~/sites/laravel5$ npm -v
3.8.3
vagrant@homestead:~/sites/laravel5$ node -v
v5.10.1
vagrant@homestead:~/sites/laravel5$ gulp -v
[06:33:48] CLI version 3.9.1
[06:33:48] Local version 3.9.1
When i execute gulp command it prompts me with:
module.js:341
throw err;
^
Error: Cannot find module 'laravel-elixir'
at Function.Module._resolveFilename (module.js:339:15)
at Function.Module._load (module.js:290:25)
When i run npm install command, it creates node_modules folder. Please let me know