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
- js
- CORS
- classlist
- watchOverflow
- querySelector
- eslint prettier
- javascirpt
- slideChange
- error
- eslint
- index
- slidePerView
- prettier
- swiperOption
- JavaScript
- v-bind
- centerSlides
- activeIndex
- display
- jquery
- archiver
- swiper
- vscode
- vue2
- Vue
- slidePerGroup
- css
- loop:true
- 인덱스
- realIndex
Archives
- Today
- Total
코딩하는 둥둥
[vue-router] cannot read properties of undefined (reading 'install') 본문
ERROR/Vue.js
[vue-router] cannot read properties of undefined (reading 'install')
둥둥 2022. 11. 19. 22:40728x90
[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