Aug 16, 2022
0
Level 7
VUE 3 error - does not provide an export named 'default'
Please help, I just setup a new Vue3 project and it's looking a bit different, script is above template and I'm getting:
The requested module '/node_modules/.vite/deps/vue.js?v=95f91f02' does not provide an export named 'default' (at axios.js)
here is my vue file:
<script>
import axios from "axios";
export default {
name: "WordCloud",
data() {
return {
words: [],
};
},
methods: {
getWords() {
axios
.get(
"https://gist.githubusercontent.com/raymondmuller/1092b8c9eec53d931a86961f7e635465/raw/ff2f9afdea00efd8d95a8d10654455dd68bd3f43/topics.json"
)
.then((response) => {
console.log(response.data);
});
},
},
};
</script>
<template>
<div>
<button @click.prevent="getWords">Load Words</button>
</div>
</template>
Please or to participate in this conversation.