Updating Elixir to 3.3, error when running Gulp

Published 2 years ago by domioanna

After updating package.json to pull in the latest release of Elixir (3.3.1) and running npm install to update, now whenever I run gulp I get the following error

Error: Cannot find module 'laravel-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> (/Users/domioanna/Code/spark-test/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)

Any ideas?

Best Answer (As Selected By domioanna)
domioanna

Fixed: upgraded out of date Node / npm

All working. Normal service is now resumed.

Thanks guys.

mikebronner

I did the following to update:

npm update laravel-elixir

This seemed to work fine. Also double-check your packages.son file to make sure laravel-elixir is listed to be installed. Sounds like it may be missing from your node_modules folder?

domioanna

Nope, that doesn't work, and now I can't install an earlier version of Laravel Elixir, it just resorts to try install the latest version which dumps out a whole string of errors when trying to install...

domioanna

I just uninstall all instances of Laravel Elixir, then installed it, whilst watching the node_module/laravel-elixir folder...

It created all the files for Laravel Elixir, then created a node_modules folder, then proceeded to delete all the other files in laravel-elixir folder except the node_modules folder

ejdelmonico

I just usually delete the node_modules directory and run npm install to pull in the most current versions. This has worked consistently for me.

domioanna

I've tried that too @ejdelmonico but for some reason it just wont play on mine at all. I wonder if upgrading to El Capitan has had anything to do with it as if has the same issue when I install a brand new Laravel app...

domioanna

Fixed: upgraded out of date Node / npm

All working. Normal service is now resumed.

Thanks guys.

Please sign in or create an account to participate in this conversation.