Cannot read property 'mergeConfig' of undefined
ryanrca opened this issue · comments
Starting from a blank directory, I did:
npm install gulp
npm install laravel-elixir-vue-2
npm install laravel-elixir
Then I got this error:
> gulp
/srv/elix2/node_modules/laravel-elixir-vue-2/index.js:4
Elixir.webpack.mergeConfig({
^
TypeError: Cannot read property 'mergeConfig' of undefined
at /srv/elix2/node_modules/laravel-elixir-vue-2/index.js:4:17
at /srv/elix2/node_modules/laravel-elixir/dist/index.js:29:16
at Array.forEach (native)
at global.Elixir (/srv/elix2/node_modules/laravel-elixir/dist/index.js:28:24)
at Object.<anonymous> (/srv/elix2/gulpfile.js:5:1)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
is webpack present in the npm_modules directory?
@LinusBorg I have the same problem. Yes, webpack is present, at least for me.
Node & npm version?
Node: v6.7.0
npm: 3.10.3
Reverted back to Browserify...
Hi! @ryanrca @zachleigh if you're using Laravel 5.3, you should be able to to just run "npm install" from the project directory.
Laravel's package.json has all of the devDependencies you'd need already, including this one and their official version of webpack that solves the mergeConfig issue: ("laravel-elixir-webpack-official": "^1.0.2").
You need webpack for elixir. If you already have it then maybe it needs an update
npm install laravel-elixir-webpack-official --save-dev
@garhbod solution solve my problem, thanks!
@garhbod maaaaan! Thanks!
wow