250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- JavaScript
- eslint
- javascirpt
- index
- slidePerGroup
- 인덱스
- display
- slideChange
- realIndex
- querySelector
- classlist
- CORS
- activeIndex
- error
- watchOverflow
- loop:true
- swiper
- archiver
- jquery
- js
- slidePerView
- swiperOption
- eslint prettier
- Vue
- css
- vue2
- vscode
- prettier
- centerSlides
- v-bind
Archives
- Today
- Total
코딩하는 둥둥
[ ERROR] Uncaught TypeError: Cannot read properties of undefined (reading 'install') 본문
Frontend/Vue.js
[ ERROR] Uncaught TypeError: Cannot read properties of undefined (reading 'install')
둥둥 2023. 1. 15. 19:54728x90
[vue-router] Router must be called with the new operator.
Uncaught TypeError: Cannot read properties of undefined (reading 'install')
vue create 프로젝트명
으로 개발 환경 구현중 발생한 오류이다.
결론적으로 말하면 vue2를 사용할 경우에는 vue-router3버전을 사용해야 한다.
vue2로 프로젝트를 만든 후에 npm install vue-router
을 사용해 vue-router을 설치했는데, 이 과정에서 자동적으로 vue-router4버전대가 설치되었다.
References.
https://velog.io/@k_jihye92/Vuevue-router-cannot-read-properties-of-undefined-reading-install
https://stackoverflow.com/questions/64576005/vue-router-with-vue-3-raises-the-error-uncaught-typeerror-object-is-not-a
728x90
'Frontend > Vue.js' 카테고리의 다른 글
[ Vue2 ] Swiper외부에서 Swiper Index 사용하기 (0) | 2023.02.08 |
---|---|
[Vue warn]: Invalid prop: type check failed for prop "width". Expected Number with value 100, got String with value "100". (0) | 2023.01.15 |
[Vue warn]: Property or method "test" is not defined on the instance but referenced during render. (0) | 2023.01.15 |
npm run serve Error (0) | 2023.01.15 |
[Vue-Router] 페이지 새로고침 (0) | 2022.11.19 |