Is "App.vue" in the same directory as your app.js?
Apr 2, 2019
6
Level 10
Error loading Vue AirBnB Style DatePicker
Hi Guys,
I have been following the vue tutorials but this is the first time I have tried to load a vue component from git. I am trying to load this airbnb style date picker and having an issue. On the install page https://mikaeledebro.gitbooks.io/vue-airbnb-style-datepicker/INSTALLATION.html
I have installed the picker and date-fns with npm. Then when I add the following to my app.js I get an error
import Vue from 'vue'
import App from './App.vue'
// import component and stylesheet
import AirbnbStyleDatepicker from 'vue-airbnb-style-datepicker'
import 'vue-airbnb-style-datepicker/dist/vue-airbnb-style-datepicker.min.css'
// see docs for available options
const datepickerOptions = {}
// make sure we can use it in our components
Vue.use(AirbnbStyleDatepicker, datepickerOptions)
new Vue({
el: '#app',
render: h => h(App),
})
Here is the error in console
Uncaught Error: Cannot find module "./App.vue"
If I try to remove the import App from './App.vue' I get
Error in render: "ReferenceError: App is not defined"
Thanks Chris
Level 28
Probably, yes.
I'd just install vue via npm and then use it like that. Or is there a special reason why you use it from a CDN?
Please or to participate in this conversation.