{"action":"created","issue":{"url":"https://api.github.com/repos/express-vue/express-vue/issues/176","repository_url":"https://api.github.com/repos/express-vue/express-vue","labels_url":"https://api.github.com/repos/express-vue/express-vue/issues/176/labels{/name}","comments_url":"https://api.github.com/repos/express-vue/express-vue/issues/176/comments","events_url":"https://api.github.com/repos/express-vue/express-vue/issues/176/events","html_url":"https://github.com/express-vue/express-vue/issues/176","id":312299089,"number":176,"title":"Importing component from node modules to use in render","user":{"login":"Kaizor","id":19311322,"avatar_url":"https://avatars2.githubusercontent.com/u/19311322?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaizor","html_url":"https://github.com/Kaizor","followers_url":"https://api.github.com/users/Kaizor/followers","following_url":"https://api.github.com/users/Kaizor/following{/other_user}","gists_url":"https://api.github.com/users/Kaizor/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaizor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaizor/subscriptions","organizations_url":"https://api.github.com/users/Kaizor/orgs","repos_url":"https://api.github.com/users/Kaizor/repos","events_url":"https://api.github.com/users/Kaizor/events{/privacy}","received_events_url":"https://api.github.com/users/Kaizor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-04-08T11:50:56Z","updated_at":"2018-04-09T16:34:55Z","closed_at":null,"author_association":"NONE","body":"### Description of Issue\r\nI'm trying to import Vue Draggable into my project but having some trouble with it.\r\n\r\nI have a route rendering my parent component, which then includes my child component which is the one that has the draggable component in it.\r\n\r\nI have had a look at other issues and saw that #112 was having trying to implement it as well, but we seem to have different issues and errors. But I've still tried to implement it the same way they have to see if it resolves the issue but it does not.\r\n\r\n**My Setup:**\r\n**src/controllers/selection.ts**\r\n```\r\nimport { Request, Response } from 'express'\r\nimport draggable from 'vuedraggable'\r\n\r\nexport let index = (req: Request, res: Response) => {\r\n    const options = {\r\n        head: {\r\n            styles: [\r\n                { style: '/css/main.css' },\r\n                { style: 'https://fonts.googleapis.com/css?family=Raleway' }\r\n            ],\r\n            metas: [\r\n                { name: 'viewport', content: 'width=device-width, initial-scale=1' }\r\n            ],\r\n            scripts: [\r\n                { src: 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js' }\r\n            ]\r\n        },\r\n        components: {\r\n            'draggable': draggable\r\n        }\r\n    }\r\n    const data = {}\r\n    res.renderVue('pages/selection/Main.vue', data, options)\r\n}\r\n```\r\n**pages/selection/Main.vue** - Parent Component\r\n```\r\n<template>\r\n    <div>\r\n        <child-component />\r\n    </div>\r\n</template>\r\n<script>\r\nimport ChildComponent from './selection/ChildComponent.vue'\r\nexport default {\r\n    data () {\r\n        return {}\r\n    },\r\n    components: {\r\n        ChildComponent\r\n    }\r\n}\r\n</script>\r\n```\r\n**pages/selection/ChildComponent.vue** - ChildComponent\r\n```\r\n<template>\r\n  <div>\r\n     <draggable v-model=\"list\" :options=\"{group:'people'}\" @start=\"drag=true\" @end=\"drag=false\">\r\n       <div v-for=\"(item, index) in list\">\r\n         {{item}}\r\n       </div>\r\n     </draggable>\r\n  </div>\r\n</template>\r\n<script>\r\nimport draggable from 'vuedraggable'\r\nexport default {\r\n  data () {\r\n    return {}\r\n  },\r\n  components: {\r\n    draggable\r\n  }\r\n}\r\n</script>\r\n```\r\n\r\n### Stack Trace / Console Log\r\n\r\nBy the looks of it the component isn't importing properly\r\n```\r\nvue.min.js:6 ReferenceError: buildAttribute is not defined\r\n    at update (selection:formatted:1533)\r\n    at o.render (selection:formatted:1535)\r\n    at o.fn._render (vue.min.js:6)\r\n    at o.<anonymous> (vue.min.js:6)\r\n    at St.get (vue.min.js:6)\r\n    at new St (vue.min.js:6)\r\n    at o.hn.$mount (vue.min.js:6)\r\n    at o.hn.$mount (vue.min.js:6)\r\n    at init (vue.min.js:6)\r\n    at vue.min.js:6\r\nvue.min.js:6 ReferenceError: eventsListened is not defined\r\n    at o.mounted (selection:formatted:1554)\r\n    at _t (vue.min.js:6)\r\n    at Object.insert (vue.min.js:6)\r\n    at A (vue.min.js:6)\r\n    at hn.__patch__ (vue.min.js:6)\r\n    at hn._update (vue.min.js:6)\r\n    at hn.<anonymous> (vue.min.js:6)\r\n    at St.get (vue.min.js:6)\r\n    at new St (vue.min.js:6)\r\n    at hn.$mount (vue.min.js:6)\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/express-vue/express-vue/issues/comments/379814358","html_url":"https://github.com/express-vue/express-vue/issues/176#issuecomment-379814358","issue_url":"https://api.github.com/repos/express-vue/express-vue/issues/176","id":379814358,"user":{"login":"Kaizor","id":19311322,"avatar_url":"https://avatars2.githubusercontent.com/u/19311322?v=4","gravatar_id":"","url":"https://api.github.com/users/Kaizor","html_url":"https://github.com/Kaizor","followers_url":"https://api.github.com/users/Kaizor/followers","following_url":"https://api.github.com/users/Kaizor/following{/other_user}","gists_url":"https://api.github.com/users/Kaizor/gists{/gist_id}","starred_url":"https://api.github.com/users/Kaizor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kaizor/subscriptions","organizations_url":"https://api.github.com/users/Kaizor/orgs","repos_url":"https://api.github.com/users/Kaizor/repos","events_url":"https://api.github.com/users/Kaizor/events{/privacy}","received_events_url":"https://api.github.com/users/Kaizor/received_events","type":"User","site_admin":false},"created_at":"2018-04-09T16:34:55Z","updated_at":"2018-04-09T16:34:55Z","author_association":"NONE","body":"Fair enough, like I said above I just saw that the user in #112 had put the components block in the vueOptions so I thought I'd give it a go to see if it solved the issue I was having. :)\r\n\r\nThe error is from the console in the browser, sorry I should have clarified that.\r\n\r\nAlso the `buildAttribute` is within the update method in the `vuedraggable` component if that is any help."}}
{"actor":{"display_login":"Kaizor"}}