vuejs / laravel-elixir-vue-2

Laravel Elixir Vue 2.0 support plugin
105 stars 20 forks source link

Cannot read property 'mergeConfig' of undefined #9

Open ryanrca opened 8 years ago

ryanrca commented 8 years ago

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)
LinusBorg commented 8 years ago

is webpack present in the npm_modules directory?

zachleigh commented 8 years ago

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

LinusBorg commented 8 years ago

Node & npm version?

zachleigh commented 8 years ago

Node: v6.7.0
npm: 3.10.3

Reverted back to Browserify...

Technopathic commented 8 years ago

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

garhbod commented 7 years ago

You need webpack for elixir. If you already have it then maybe it needs an update npm install laravel-elixir-webpack-official --save-dev

polaroi8d commented 7 years ago

@garhbod solution solve my problem, thanks!

rufatZZ commented 7 years ago

@garhbod maaaaan! Thanks!

Wabuluka commented 6 years ago

wow