Open AndersBrohus opened 7 years ago
What's your environment? Nuxt? Webpack? Server-side?
On Tue, Aug 29, 2017 at 5:50 PM, Anders Brohus notifications@github.com wrote:
When i
import * as VueGoogleMaps from 'vue2-google-maps';
i got this error
These relative modules were not found:
- ./components/infoWindow.vue in ./node_modules/vue2-google-maps/dist/main.js
- ./components/map.vue in ./node_modules/vue2-google-maps/dist/main.js
- ./components/streetViewPanorama.vue in ./node_modules/vue2-google-maps/dist/main.js
- ./components/placeInput.vue in ./node_modules/vue2-google-maps/dist/main.js
- ./components/autocomplete.vue in ./node_modules/vue2-google-maps/dist/main.js
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/xkjyeah/vue-google-maps/issues/199, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiTRzM9awjBCBjlT5KX0fRlLynYzyZvks5sc97ugaJpZM4PFqDe .
@xkjyeah It's Webpack :-)
Yikes I'm not sure how to help you there. Must be a recent webpack or VueJs update that broke it
On 29 Aug 2017 18:40, "Anders Brohus" notifications@github.com wrote:
@xkjyeah https://github.com/xkjyeah It's Webpack :-)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/xkjyeah/vue-google-maps/issues/199#issuecomment-325625478, or mute the thread https://github.com/notifications/unsubscribe-auth/ACiTR77pi0aeMXbRe8FwMJDy9hEOvOt-ks5sc-qngaJpZM4PFqDe .
Same problem here with first time install. @AndersBrohus did you managed to debug this?
same problem here!
Uncaught TypeError: Cannot read property 'install' of undefined
at Function.Vue.use (vue.esm.js:4750)
at Object.apply (application.js:37)
at __webpack_require__ (bootstrap c70af23…:19)
at Object.<anonymous> (app.vue:13)
at __webpack_require__ (bootstrap c70af23…:19)
at bootstrap c70af23…:62
at bootstrap c70af23…:62
package (rails webpacker)
{
"name": "vue-rails",
"private": true,
"dependencies": {
"@rails/webpacker": "^3.3.1",
"axios": "^0.18.0",
"jwt-decode": "^2.2.0",
"vue": "^2.5.16",
"vue-axios": "^2.1.0",
"vue-loader": "^14.2.1",
"vue-router": "^3.0.1",
"vue-template-compiler": "^2.5.16",
"vue2-google-maps": "^0.8.11"
},
"devDependencies": {
"webpack-dev-server": "2.11.2"
},
"resolve": {
"alias": {
"vue": "vue/dist/vue.js"
}
}
}
Bump! Anyone found a solution?
1 year after... Anyone found a solution ?
2 years... Some solution?
import { ...VueGoogleMaps } from 'vue2-google-maps';
Works for me :)
try this on main.js:
if (process.browser) {
const VueGoogleMaps = require('vue2-google-maps');
Vue.use(VueGoogleMaps, {
load: {
key: 'myKey',
libraries: 'places',
},
});
}
You can try to delete node_modules folder (with all the files inside).
Then run npm install
When i
import * as VueGoogleMaps from 'vue2-google-maps';
i got this error