allowJs 의 설정이 안 먹히고 있습니다.
978
작성한 질문수 2
{
"dependencies": {
"axios": "^0.26.1",
"core-js": "^3.8.3",
"vue": "^2.6.14",
"vue-router": "^3.5.3",
"vuex": "^3.6.2"
},
...
}
tsconfig.json은 아래와 같습니다
{
"compilerOptions": {
"target": "esnext",
"module": "esnext",
"strict": false,
"noImplicitAny": false,
"allowJs": true,
"jsx": "preserve",
"importHelpers": true,
"moduleResolution": "node",
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"sourceMap": true,
"baseUrl": ".",
"types": ["webpack-env"],
"paths": {
"@/*": ["src/*"]
},
"lib": ["esnext", "dom", "dom.iterable", "scripthost"]
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue",
"tests/**/*.ts",
"tests/**/*.tsx"
],
"exclude": ["node_modules"]
}
혹 더 필요한 데이터가 있으면 말씀해주세요!
답변 3
0
자몽님과는 다르게
"api/index.js 파일은 입력 파일을 덮어쓰므로 쓸 수 없습니다." 라는 오류가 발생하였으나
자몽님과 동일한 버전으로 맞추어보니 해결되었습니다.
감사합니다!
0
안녕하세요 자몽님, 라우터 쪽 코드 보여주시겠어요? 그리고 라우터 버전을 3.3.4로 낮춰보세용 :)
0
안녕하세요 캡틴판교님.
1_ router 쪽 소스는 아래와 같습니다. (따로 건들지 않았습니다.)
import Vue from 'vue';
import VueRouter from 'vue-router';
import { ItemView, UserView } from '../views';
import createListView from '../views/CreateListView';
import bus from '../utils/bus.js';
import store from '../store/index.js';
Vue.use(VueRouter);
export default new VueRouter({
mode: 'history',
routes: [
{
path: '/',
redirect: '/news'
},
{
path: '/news',
name: 'news',
component: createListView('NewsView'),
beforeEnter(routeTo, routeFrom, next) {
bus.$emit('on:progress');
store.dispatch('FETCH_LIST', routeTo.name)
.then(() => next())
.catch((() => new Error('failed to fetch news items')));
},
},
{
path: '/ask',
name: 'ask',
component: createListView('AskView'),
beforeEnter(routeTo, routeFrom, next) {
bus.$emit('on:progress');
store.dispatch('FETCH_LIST', routeTo.name)
.then(() => next())
.catch((() => new Error('failed to fetch news items')));
},
},
{
path: '/jobs',
name: 'jobs',
component: createListView('JobsView'),
beforeEnter(routeTo, routeFrom, next) {
bus.$emit('on:progress');
store.dispatch('FETCH_LIST', routeTo.name)
.then(() => next())
.catch((() => new Error('failed to fetch news items')));
},
},
{
path: '/item/:id',
component: ItemView,
beforeEnter(routeTo, routeFrom, next) {
bus.$emit('on:progress');
const itemId = routeTo.params.id;
store.dispatch('FETCH_ITEM', itemId)
.then(() => next())
.catch(err => new Error('failed to fetch item details', err));
},
},
{
path: '/user/:id',
component: UserView,
beforeEnter(routeTo, routeFrom, next) {
bus.$emit('on:progress');
const itemId = routeTo.params.id;
store.dispatch('FETCH_USER', itemId)
.then(() => next())
.catch(err => new Error('failed to fetch user profile', err));
},
}
]
})
2_ router의 버전 문제가 아닌 것 같다고 판단한 이유는 아래와 같습니다.
(버전은 방금 수정해보았으나, 동일한 오류가 뜨는 것 같네요.)
import 된 것의 순서를 아래와 같이 store로 바꾸어 보아도 동일한 오류 메시지가 출력됩니다.
composition API에서의 ref
1
247
2
Vue3 + Typescript + Vite + Pinia 참조
3
1859
2
mutation 함수 이름을 enum으로 관리하는 이유
1
349
2
this.todoItem 타입이 any 라고 나옵니다
1
399
1
프로젝트 실행 시 오류가 발생합니다.
1
588
2
두번째 프로젝트 권한 요청 드립니다.
1
372
2
강의자료 ? 노트?
1
358
2
vuex 사용시 mapper 보다는 그냥 쓰는 것이 낫다고 하셨는데요..
1
289
2
권한 허가 부탁드립니다!
1
412
2
Chart.js(3.9.1버전) 안되시는분들 이렇게 해보세요
1
872
2
두번째 프로젝트 권한 요청 드립니다.
1
378
2
두번째 프로젝트 권한 요청드립니다.
1
456
3
두번째 프로젝트 권한 요청 합니다.
1
338
1
두번째 프로젝트 npm i && npm run serve에러 납니다..
1
496
2
두번째 프로젝트 권한 요청 드립니다
1
467
1
두번째 프로젝트 권한 요청 드립니다
1
420
2
두번쨰 프로젝트 권한요청
1
414
3
두번째 프로젝트 권한 요청
1
365
2
두번째 프로젝트 권한부탁드립니다.
1
334
1
권한요청 드립니다.
1
334
1
두번째 프로젝트 권한 요청 드립니다.
1
345
1
project.d.ts 파일관련 문의사항
2
407
2
권한요청입니다.
1
372
2
두번째 프로젝트 권한요청
1
203
2





