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
尝试在您的项目目录中手动安装 laravel-elixir。
npm install laravel-elixir --save-dev
If you encountered this problem "Cannot find module 'laravel-elixir'" I have a solution for you. Follow the commands below:
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.