1

when i type in terminal in laravel dei project gulp always say

module.js:549
throw err;
^
Error: Cannot find module 'laravel-elixir'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\xampp\htdocs\codehacking\gulpfile.js:1:76)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)

and try npm install and npm install --global gulp too

3 Answers 3

5

Try installing laravel-elixir manually in your project directory.

npm install laravel-elixir --save-dev
Sign up to request clarification or add additional context in comments.

Comments

2

If you encountered this problem "Cannot find module 'laravel-elixir'" I have a solution for you. Follow the commands below:

  • npm install node-sass@latest
  • npm uninstall laravel-elixir
  • npm uninstall session
  • npm install --save laravel-elixir
  • npm install --save session
  • gulp

Comments

0

I was getting the same error, I tried above solution and many other, did not work for me. Following two commands fixed my error.

npm install --global --production windows-build-tools

npm install node-gyp

The complete solution is on the following link: https://catalin.me/how-to-fix-node-js-gyp-err-cant-find-python-executable-python-on-windows/

My OS is windows.

Then in my Laravel 5.2 on the root of project I ran following command

npm install

Then I ran gulp command

gulp

gulp started working: Gulp Command Image Gulp Command Image

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.