run
npm install reinstall
os: windows 7 64 node:v7.2.1 npm:4.0.3
I have an issue when i run gulp:
error:
"Elixir.webpack.mergeConfig({ ^
TypeError: Cannot read property 'mergeConfig' of undefined"
and i can´t install elixir webpack:
i run it:
npm install --no-bin-links laravel-elixir-webpack-official --save-dev
error:
"npm WARN addRemoteGit Error: not found: git"
anyone can help? much appreciated!
run
npm install reinstall
Did you include your own webpack.config.js in the root of your project? If not, I would delete your node_modules folder and re-install as @Ishatanjeeb has stated.
thanks for the reply!
so i delete de module_node from the project folder.
execute: npm install reinstall
then i execute: npm install gulp. it finish,
then i run: gulp
and starts asking me first to install: Error: Cannot find module 'laravel-elixir'
so i run: npm install --no-bin-links laravel-elixir it finish
then i run: gulp
and now asks me Error: Cannot find module 'laravel-elixir-vue-2' so i run: npm install --no-bin-links laravel-elixir-vue-2
and then i run gulp and gives me this erro witch first posted error:
"Elixir.webpack.mergeConfig({ ^
TypeError: Cannot read property 'mergeConfig' of undefined"
i searched google and still nothing
@demianton I had the same problem, this is how I solved it:
1. Delete node_modules
2. Install the latest version of node.js
3. npm install npm@latest -g
4. npm install gulp
5. npm install
6. gulp and see if it works now...
Also, don't do steps 1. - 6. in PhpStorm's Command Line Tools Console (if you are using it), try to do it in Git Bash or somewhere else... and if the gulp command is executed successfully (for the first time), then you can start using PhpStorm's Command Line Tools Console.
Ok ! Works now, great! i was losing hope just now back to business Thanks a lot!
@Filip_Zdravkovic please I need your help, I have tried over and over to get this gulp error sorted for about 24 hours now all to no avail. I have just bumped into your advise, tried your steps 1 to 6, the error now is
module.js:471 throw err: ^
Error: Cannot find module 'laravel-elixir' at Function.Module._resolveFilename(module.js:469:15) at Function.Load (module.js:417:25) at Module.require (module.js:417:17) at require (internal/modue.js:20:19) at Object. (C:\xampp\htdocs\laravel\gulpfile.js:1:178) at Module._compile (module.js:570:32) at Object,Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)
But on running npm install (step 5), it ran with some errors as below;
npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" a\Roaming\npm\node_modules\npm\bin\npm-cli.js" npm ERR! node v6.9.3 npm ERR! npm v4.0.5 npm ERR! code ENOGIT
npm ERR! not found: git npm ERR! npm ERR! Failed using git. npm ERR! This is most likely not a problem with npm npm ERR! Please check if you have git installed and
npm ERR! Please include the following file with any npm ERR! C:\xampp\htdocs\laravel\npm-debug.log
I went further by running 'npm install --no-bin-links laravel-elixir'. After that I ran: gulp. It now says Error: Cannot find module 'laravel-elixir-vue-2'. I then ran: npm install --no-bin-links laravel-elixir-vue-2. After, I ran gulp again and it brought the error I had on finding out this page:
C:\xampp\htdocs\laravel\node_modules\laravel-elixir-vue-2\index.js:4 Elixir.webpack.mergeConfig({ ^
TypeError: Cannot read property 'mergeConfig' of undefined at C:\xampp\htdocs\laravel\node_modules\laravel-elixir-vue-2\index.js:4:17 at C:\xampp\htdocs\laravel\node_modules\laravel-elixir\dist\index.js:29:16 at Array.forEach (native) at global.Elixir (C:\xampp\htdocs\laravel\node_modules\laravel-elixir\dist\i ndex.js:28:24) at Object. (C:\xampp\htdocs\laravel\gulpfile.js:16:1) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)
Please help, it's really frustrating.
@paulanekwe Sorry for the late response... have you solved the problem in the meantime? I see that you are getting:
npm ERR! not found: git
ENOGIT
Install git: https://github.com/npm/npm/wiki/Troubleshooting#no-git ... and then try it again.
Yes installing git as advised worked. Thank you a lot.
Please or to participate in this conversation.