i am a complete beginner in JavaScript and Vue.js. I started a Vue.js project with vue-cli yesterday, because I need it for my job and I ran into some problems. I wanted to install "pretty-checkbox-vue" and it is currently in my 'node_module' folder.
In the README.md of the Gitrepo for this package it says :
Browser
Include the script file, then install the component with Vue.use(PrettyCheckbox); e.g.:
<script type="text/javascript" src="node_modules/pretty-checkbox-vue/dist/pretty-checkbox-vue.min.js"></script>
<script type="text/javascript">
Vue.use(PrettyCheckbox);
</script>
Module
import PrettyCheckbox from 'pretty-checkbox-vue';
Vue.use(PrettyCheckbox);
The questions are :
Where do I put these code snippets in ? \
I have a main.js and App.vue.
And if I write import PrettyCheckbox from 'pretty-checkbox-vue'; in my main.js I get a "could not find a declaration file for module 'pretty-check-box'" message.
Is this message normal, becaus I haven't included the script file ?
Thank you in advance!
EDIT :
main.js :
import Vue from 'vue'
import App from './App.vue'
import PrettyCheckbox from 'pretty-checkbox-vue';
Vue.use(PrettyCheckbox);
Vue.config.productionTip = false
new Vue({
render: h => h(App),
}).$mount('#app')
Folder Structure
- Project_folder
- node_modules
- pretty-checkbox
- pretty-checkbox-vue
- src
- main.js
- App.vue
- public
- index.html
- node_modules