• 카테고리

    질문 & 답변
  • 세부 분야

    풀스택

  • 해결 여부

    미해결

vue dependency 설정으로 문의가 있습니다.

23.09.25 11:30 작성 23.09.25 13:18 수정 조회수 534

0

현재 github에 작성된 client(vue3) dependency를 사용하니 에러가 발생해서

project\client>npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @vue/eslint-config-standard@6.1.0
npm ERR! Found: eslint-plugin-vue@8.7.1
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   dev eslint-plugin-vue@"^8.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR! node_modules/@vue/eslint-config-standard
npm ERR!   dev @vue/eslint-config-standard@"^6.1.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: eslint-plugin-vue@7.20.0
npm ERR! node_modules/eslint-plugin-vue
npm ERR!   peer eslint-plugin-vue@"^7.0.0" from @vue/eslint-config-standard@6.1.0
npm ERR!   node_modules/@vue/eslint-config-standard
npm ERR!     dev @vue/eslint-config-standard@"^6.1.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR!
npm ERR! For a full report see:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-09-25T04_17_40_745Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: C:\Users\user\AppData\Local\npm-cache\_logs\2023-09-25T04_17_40_745Z-debug-0.log
  • dependency에서는 아래와 같이 버전을 수정하고

@fortawesome/fontawesome-svg-core: 6.4.2
@fortawesome/free-regular-svg-icons: 6.4.2
@fortawesome/free-solid-svg-icons: 6.4.2
@fortawesome/vue-fontawesome: 3.0.0-5
@fullcalendar/core: 6.1.9
@fullcalendar/daygrid: 6.1.9
@fullcalendar/interaction: 6.1.9
@fullcalendar/timegrid: 6.1.9
@fullcalendar/vue3: 5.11.1
apexcharts: 3.35.3
vue3-apexcharts: 1.4.4
  • devdependency에서는 아래와 같이 수정했습니다.

    "@vue/eslint-config-standard": "^6.1.0"
    
    과 호환성으로
    
    "eslint-plugin-vue": "^8.0.3"
    
    ===> 변경 후
    "eslint-plugin-vue": "^7.0.0"
    

따라서 사용하는 dependency는 아래와 같습니다.

아래 버전으로 사용해도 강의를 따라가는데 지장이 없을까요?

  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.4.2",
    "@fortawesome/free-regular-svg-icons": "^6.4.2",
    "@fortawesome/free-solid-svg-icons": "^6.4.2",
    "@fortawesome/vue-fontawesome": "^3.0.0-5",
    "@fullcalendar/core": "^6.1.9",
    "@fullcalendar/daygrid": "^6.1.9",
    "@fullcalendar/interaction": "^6.1.9",
    "@fullcalendar/timegrid": "^6.1.9",
    "@fullcalendar/vue3": "^5.11.1",
    "apexcharts": "^3.35.3",
    "axios": "^0.27.2",
    "bootstrap": "^5.1.3",
    "core-js": "^3.8.3",
    "exceljs": "^4.3.0",
    "file-saver": "^2.0.5",
    "vue": "^3.2.13",
    "vue-cookies": "^1.8.1",
    "vue-good-table-next": "^0.2.1",
    "vue-loading-overlay": "^5.0.3",
    "vue-router": "^4.0.3",
    "vue-sweetalert2": "^5.0.5",
    "vue3-apexcharts": "^1.4.4",
    "vuex": "^4.0.0",
    "vuex-persistedstate": "^4.1.0"
  },
  "devDependencies": {
    "@babel/core": "^7.12.16",
    "@babel/eslint-parser": "^7.12.16",
    "@vue/cli-plugin-babel": "~5.0.0",
    "@vue/cli-plugin-eslint": "~5.0.0",
    "@vue/cli-plugin-router": "~5.0.0",
    "@vue/cli-plugin-vuex": "~5.0.0",
    "@vue/cli-service": "~5.0.0",
    "@vue/eslint-config-standard": "^6.1.0",
    "eslint": "^7.32.0",
    "eslint-plugin-import": "^2.25.3",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^5.1.0",
    "eslint-plugin-vue": "^7.0.0"
  },

npm install을 시도하니 문제는 없었습니다.

C:project\client>npm install
npm WARN deprecated shvl@2.0.3: older versions vulnerable to prototype pollution
npm WARN deprecated vuex-persistedstate@4.1.0: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

added 110 packages, removed 9 packages, changed 4 packages, and audited 1148 packages in 1m

6 packages are looking for funding
  run `npm fund` for details

1 low severity vulnerability

To address all issues, run:
  npm audit fix

Run `npm audit` for details.

답변 2

·

답변을 작성해보세요.

0

dependency 수정하지 마시고

npm install 명령어를 실행할 때, –force 또는 –legacy-peer-deps 옵션을 추가하여 강제로 의존성을 설치해보세요.

0

인프런 AI 인턴님의 프로필

인프런 AI 인턴

2023.09.27

안녕하세요, 인프런 AI 인턴이에요.

에러가 발생한 원인은 vue dependency 관련 문제로 보입니다. 보고된 오류의 내용을 보면, “@vue/eslint-config-standard@6.1.0” 패키지가 “eslint-plugin-vue” 패키지의 버전 “7.0.0”과 충돌하기 때문에 발생한 오류이네요.

오류 해결을 위해 다음과 같은 방법을 시도해볼 수 있어요.
1. package.json 파일에서 “@vue/eslint-config-standard” 패키지의 버전을 “6.1.0”에서 “7.0.0”으로 업데이트해보세요.
2. npm install 명령어를 실행할 때, –force 또는 –legacy-peer-deps 옵션을 추가하여 강제로 의존성을 설치해보세요.
3. 오류 메시지에 나오는 경로에 있는 에러 로그 파일을 확인하여 자세한 오류 내용을 확인해보세요.

만약 위의 방법으로 해결되지 않는다면, 오류가 발생한 프로젝트의 환경과 종속성을 더 자세히 알아야 할 것 같아요. 추가 정보를 제공해주시면 더 도움을 드릴 수 있을 것 같아요.