{"action":"created","issue":{"url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/2","repository_url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2","labels_url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/2/comments","events_url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/2/events","html_url":"https://github.com/vuejs/laravel-elixir-vue-2/issues/2","id":173582764,"number":2,"title":"TypeError: Cannot read property 'call' of undefined","user":{"login":"rockymontana","id":330839,"avatar_url":"https://avatars.githubusercontent.com/u/330839?v=3","gravatar_id":"","url":"https://api.github.com/users/rockymontana","html_url":"https://github.com/rockymontana","followers_url":"https://api.github.com/users/rockymontana/followers","following_url":"https://api.github.com/users/rockymontana/following{/other_user}","gists_url":"https://api.github.com/users/rockymontana/gists{/gist_id}","starred_url":"https://api.github.com/users/rockymontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockymontana/subscriptions","organizations_url":"https://api.github.com/users/rockymontana/orgs","repos_url":"https://api.github.com/users/rockymontana/repos","events_url":"https://api.github.com/users/rockymontana/events{/privacy}","received_events_url":"https://api.github.com/users/rockymontana/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-27T07:15:15Z","updated_at":"2016-08-27T20:31:54Z","closed_at":"2016-08-27T14:25:14Z","body":"Hello.\r\nI'm trying to get vue2 to run on Laravel (obviously).\r\n\r\nFirst, I install npm packages. All according to plan.\r\nBut when I run gulp I get:\r\n\r\n```\r\n</path/to/project>/node_modules/laravel-elixir-vue-2/index.js:17\r\n  return fn.call(this, file, input, output, options)\r\n           ^\r\n\r\nTypeError: Cannot read property 'call' of undefined\r\n    at Object.elixir.mixins.webpack (</path/to/project>/node_modules/laravel-elixir-vue-2/index.js:17:12)\r\n    at </path/to/project>/gulpfile.js:18:10\r\n    at global.Elixir (</path/to/project>/node_modules/laravel-elixir/dist/index.js:21:5)\r\n    at Object.<anonymous> (</path/to/project>/gulpfile.js:16:1)\r\n    at Module._compile (module.js:541:32)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:458:32)\r\n    at tryModuleLoad (module.js:417:12)\r\n    at Function.Module._load (module.js:409:3)\r\n    at Module.require (module.js:468:17)\r\n```\r\n\r\nHere's my gulp-file:\r\n\r\n```\r\nconst elixir = require('laravel-elixir')\r\nrequire('laravel-elixir-vue-2')\r\n\r\nelixir(function(mix) {\r\n    mix.sass('admin/app.scss')\r\n        .webpack('admin/app.js')\r\n})\r\n```\r\n\r\nAnd at the LaraconEU workshop Evan said that the `require('laravel-elixir-vue-2')` needs to be within the elixir function. So I tried that too.\r\nLike this:\r\n```\r\nconst elixir = require('laravel-elixir')\r\nelixir(function(mix) {\r\n    require('laravel-elixir-vue-2')\r\n    mix.sass('admin/app.scss')\r\n        .webpack('admin/app.js')\r\n})\r\n```\r\nThen I get:\r\n\r\n```\r\ngulp\r\n<path/to/project>/node_modules/laravel-elixir-vue-2/index.js:21\r\n  elixir.config.js.webpack.loaders.push(\r\n                          ^\r\n\r\nTypeError: Cannot read property 'loaders' of undefined\r\n    at <path/to/project>/node_modules/laravel-elixir-vue-2/index.js:21:27\r\n    at <path/to/project>/node_modules/laravel-elixir/dist/index.js:29:16\r\n    at Array.forEach (native)\r\n    at global.Elixir (<path/to/project>/node_modules/laravel-elixir/dist/index.js:28:24)\r\n    at Object.<anonymous> (<path/to/project>/gulpfile.js:14:1)\r\n    at Module._compile (module.js:541:32)\r\n    at Object.Module._extensions..js (module.js:550:10)\r\n    at Module.load (module.js:458:32)\r\n    at tryModuleLoad (module.js:417:12)\r\n    at Function.Module._load (module.js:409:3)\r\n```\r\n\r\nLast is my package.json:\r\n```\r\n{\r\n  \"private\": true,\r\n  \"scripts\": {\r\n    \"prod\": \"gulp --production\",\r\n    \"dev\": \"gulp watch\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"gulp\": \"^3.9.1\",\r\n    \"jquery\": \"^3.1.0\",\r\n    \"laravel-elixir\": \"^6.0.0-9\",\r\n    \"laravel-elixir-vue-2\": \"^0.1.0\",\r\n    \"laravel-elixir-webpack-official\": \"^1.0.2\",\r\n    \"lodash\": \"^4.14.0\",\r\n    \"vue\": \"^2.0.0-rc.3\",\r\n    \"vue-resource\": \"^0.9.3\",\r\n    \"vue-router\": \"^2.0.0-rc.3\",\r\n    \"vuex\": \"^2.0.0-rc.5\",\r\n    \"vuex-router-sync\": \"^3.0.0\"\r\n  }\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/comments/242939178","html_url":"https://github.com/vuejs/laravel-elixir-vue-2/issues/2#issuecomment-242939178","issue_url":"https://api.github.com/repos/vuejs/laravel-elixir-vue-2/issues/2","id":242939178,"user":{"login":"rockymontana","id":330839,"avatar_url":"https://avatars.githubusercontent.com/u/330839?v=3","gravatar_id":"","url":"https://api.github.com/users/rockymontana","html_url":"https://github.com/rockymontana","followers_url":"https://api.github.com/users/rockymontana/followers","following_url":"https://api.github.com/users/rockymontana/following{/other_user}","gists_url":"https://api.github.com/users/rockymontana/gists{/gist_id}","starred_url":"https://api.github.com/users/rockymontana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rockymontana/subscriptions","organizations_url":"https://api.github.com/users/rockymontana/orgs","repos_url":"https://api.github.com/users/rockymontana/repos","events_url":"https://api.github.com/users/rockymontana/events{/privacy}","received_events_url":"https://api.github.com/users/rockymontana/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T20:31:54Z","updated_at":"2016-08-27T20:31:54Z","body":"That did the trick! Thanks a bunch!"}}
{"actor":{"display_login":"rockymontana"}}