FrontEnd/Vue.js
[ Vue.js ] Vue.createApp is not working but Is working with new Vue() method / 에러 해결
SangHoonE
2021. 9. 29. 16:24
안녕하세요 상훈입니다.
Vue.js 3 혹은 2를 사용하시는데 갑자기
Vue.createApp is not working but Is working with new Vue() method
이러한 에러가 떴다면, 사용하려는 script cdn 혹은 설치하신 vue 라이브러리가 Vue 2를 의미합니다.
그렇기 때문에 Vue 3 로 변경을 해주어야합니다.
개발 모드 혹은 공부하실 때 사용하시면 되는 cdn 주소입니다.
<script src="https://unpkg.com/vue@next"></script>
이걸로 복사하셔도 무방하구요!
참고
Vue.createApp is not working but Is working with new Vue() method
I'm getting this error tesyya.js:16 Uncaught TypeError: Vue.createApp is not a function mycode follows like this const app = Vue.createApp({ data() { return { count: 4 } } })
stackoverflow.com
반응형