laravel-elixir-vue-2 icon indicating copy to clipboard operation
laravel-elixir-vue-2 copied to clipboard

Cannot read property 'mergeConfig' of undefined

Open ryanrca opened this issue 9 years ago • 9 comments
trafficstars

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)

ryanrca avatar Oct 07 '16 19:10 ryanrca

is webpack present in the npm_modules directory?

LinusBorg avatar Oct 07 '16 21:10 LinusBorg

@LinusBorg I have the same problem. Yes, webpack is present, at least for me.

zachleigh avatar Oct 12 '16 08:10 zachleigh

Node & npm version?

LinusBorg avatar Oct 12 '16 10:10 LinusBorg

Node: v6.7.0
npm: 3.10.3

Reverted back to Browserify...

zachleigh avatar Oct 12 '16 11:10 zachleigh

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").

https://github.com/laravel/laravel/blob/master/package.json

Technopathic avatar Oct 14 '16 15:10 Technopathic

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 avatar Jul 12 '17 00:07 garhbod

@garhbod solution solve my problem, thanks!

polaroi8d avatar Jul 27 '17 08:07 polaroi8d

@garhbod maaaaan! Thanks!

rufatZZ avatar Nov 09 '17 12:11 rufatZZ

wow

Wabuluka avatar Aug 30 '18 17:08 Wabuluka