programing

Laravel Spark v4.0.9에서 "Vue 패키지 버전 불일치" 오류를 수정하려면 어떻게 해야 합니까?

bestcode 2022. 8. 13. 12:14
반응형

Laravel Spark v4.0.9에서 "Vue 패키지 버전 불일치" 오류를 수정하려면 어떻게 해야 합니까?

★★★★★★★★★★★★★★★를 실행했을 때,npm run devLaravel Spark v4.0.9 버전

Module build failed: Error:

Vue packages version mismatch:

- vue@2.0.8
- vue-template-compiler@2.2.6

This may cause things to work incorrectly. Make sure to use the same version for both.
If you are using vue-loader@>=10.0, simply update vue-template-compiler.
If you are using vue-loader@<10.0 or vueify, re-installing vue-loader/vueify should bump vue-template-compiler to the latest.

★★★package.json음음음같 뭇매하다

{
  "private": true,
  "scripts": {
    "dev": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
  },
  "dependencies": {
    "axios": "^0.15.2",
    "bootstrap": "^3.0.0",
    "cross-env": "^3.2.3",
    "jquery": "^2.1.4",
    "js-cookie": "^2.1.0",
    "laravel-mix": "0.*",
    "moment": "^2.10.6",
    "promise": "^7.1.1",
    "sweetalert": "^1.1.3",
    "underscore": "^1.8.3",
    "urijs": "^1.17.0",
    "vue": "~2.0.1",
    "vue-resource": "^1.2.0",
    "vue-router": "^2.2.1",
    "vue-truncate-filter": "^1.1.6",
    "vuejs-datepicker": "^0.6.2"
  },
  "devDependencies": {
    "browser-sync": "^2.18.8",
    "browser-sync-webpack-plugin": "^1.1.4"
  }
}

다음을 시도했습니다(순서가 아닌 다른 시간).

  • node_modules ★★★★★★★★★★★★★★★★★」npm install
  • 달려보려고 yarn ★★★★★★★★★★★★★★★★★」yarn upgrade
  • , 의vue-loader
  • npm에 의존하거나 의존관계를 파악하기 위해 실을 짜는 대신 vue와 vue-syslog의 정확한 버전을 지정한다.
  • 필수 패키지가 아닌 다른 패키지(vue-syslog, vue-sys-filter, vue-sys-datepicker)를 제거하고 위의 모든 패키지를 다시 시도합니다.
  • 벽에 머리를 부딪치다

이 방법은 효과가 있었습니다.

  1. package.json:

    “vue”: “^2.0.8",
    “vue-template-compiler”: “^2.1.8"
    
  2. ★★node_modules

  3. 실행합니다.npm install

vue의 경우^2.5.17.

고객님의 고객명package.json

을 에 추가해 주세요.devDependencies 최신 버전을 하십시오.vue-template-compiler:

  • "vue-template-compiler": "^2.5.17"

다음과 같은 출력이 표시됩니다.

"devDependencies": {
  ...
  "lodash": "^4.17.4",
  "popper.js": "^1.14.4",
  "vue": "^2.5.17", // <= note the version
  "vue-template-compiler": "^2.5.17" // <= note the version
},

그런 다음 다음을 실행합니다.

npm install

Npm은 업데이트된 패키지만 업데이트합니다.

는 없어요.node_modules업데이트 :vue,vue-template-compiler ★★★★★★★★★★★★★★★★★」vue-server-renderer타타에 @latest플래그를 지정하면 vue 패키지의 분할 버전을 사용하는 경우에 도움이 됩니다.

npm i vue-template-compiler@latest --save

npm i vue-server-renderer@latest --save

--save will will will in in will in in in in in in in in in in in in in in 의 버전이 자동으로 됩니다.package.json@latest는 사용 가능한 최신 버전의 패키지를 설치하는 것을 의미합니다.vue이치노

다음 명령을 하여 업데이트에 새 을 항상 할 수 .npm outdated업데이트해야 할 모든 패키지 목록이 표시됩니다.

나나나 by.npm update명령어 update는 마이너버전과 패치버전뿐이지만 메이저버전을 갱신하는 경우는 일반적이지 않습니다.예를들면npm update는 갱신되지 .2.4.5> =>3.0.1할 수

다음 명령어를 실행하면 도움이 됩니다.

npm install vue-template-compiler@2.5.16 --save-dev

NB. 버전 번호를 필요한 버전으로 바꿉니다.제 경우 vue 버전이 2.5.16이고 vue-template-compiler가 2.5.13이기 때문에 vue-template-compiler를 vue 버전으로 업데이트했습니다.

이게 도움이 됐으면 좋겠는데

Vue 패키지 버전 불일치 오류 수정

이 스텝은 도움이 되었습니다.

rm package-lock.json, rm -rf node_modules, npm update, npm install

Vue를 업데이트하는 것이 저의 해결책이었습니다.

npm i vue@latest --save

Kamil' Ocean의 답변에서 설명한 단계를 먼저 수행한다는 것을 언급하고 싶습니다.

npm i vue-template-compiler@latest --save

npm i vue-server-renderer@latest --save

Vue를 업데이트하면 동작합니다.

합니다.yarn global upgrade

그러면 업그레이드가 필요한 모든 관계가 업그레이드됩니다.

여기서 vue 템플릿 컴파일러는 vue 템플릿을 컴파일합니다.vue 한 버전과 vue-template-compiler 다른 버전을 사용하는 경우 문제가 발생합니다.

이 명령어 실행

npm update vue-template-compiler

이렇게 하면 문제가 해결되고 vue js 버전과 동일한 버전의 vue 템플릿 컴파일러가 설치됩니다.

종속성 확인:vue정확한 개발 의존성으로 대체한다.vue-template-compiler.

예를 들면.

"dependencies": {
    "vue": "^2.5.2",
},
"devDependencies": {
    "vue-template-compiler": "^2.5.3",
},

대체 순서:

"dependencies": {
    "vue": "2.5.2",
},
"devDependencies": {
    "vue-template-compiler": "2.5.2",
},

또,npm install다시.

이것은 나와 당신의 100%에게 효과가 있었습니다.

  1. 패키지를 변경합니다.json: "vue": "^2.6.12"에서 "vue": "2.6.12"
  2. node_modules 폴더를 삭제합니다.
  3. package-lock.json을 삭제합니다.
  4. npm 설치 실행

node_modules 폴더를 삭제한 후 다시 실행하는 대신 수락된 답변에서 선택합니다.yarn install다음 2개의 패키지를 직접 업그레이드 할 수 있습니다.

yarn upgrade vue@^2.0.8
yarn upgrade vue-template-compiler@^2.1.8

다음을 시도해 보십시오.npm install vue-template-compiler@2.0.8 --save-dev

의 변환vue-template-compiler와 같은 버전vue버전(이 경우)2.0.8)가 효과가 있었습니다.한번 해보라구요.

이 방법은 효과가 있었습니다.

  1. 패키지를 변경합니다.json: "vue": "^2.5.2"에서 "vue": "2.5".*"
  2. node_modules 폴더를 삭제합니다.
  3. package-lock.json을 삭제합니다.
  4. npm 설치 실행

나는 사용했다npm install vue --save그리고 그것은 나에게 효과가 있었다.

이 두 버전을 일치시키면 됩니다(컴파일러 값을 변경하여 패키지의 "vue" 값과 일치합니다).json 및 npm 설치 실행:

"vue": "^2.6.11",
"vue-template-compiler": "^2.6.11"

npm install

이 경우 삭제 또는 다른 것은 할 수 없습니다.

클린 인스톨을 실행하면, 다음의 커맨드를 사용할 수 있습니다.

npm ci

이 명령어에 대한 자세한 내용은 여기를 참조하십시오.

오류 메시지에서 볼 수 있듯이:

이것에 의해, 올바르게 동작하지 않게 되는 일이 있습니다.양쪽에서 같은 버전을 사용해야 합니다.vue-syslog@>=10.0 을 사용하고 있는 경우는, 간단하게 vue-syslog-syslog 를 갱신합니다.vue-loader@<10.0 또는 vueify를 사용하는 경우 vue-loader/vueify를 다시 설치하면 vue-template-compiler가 최신 버전으로 범핑됩니다.

더 높은 vue-loader를 사용하고 있었기 때문에 명령어를 실행했습니다.

npm update vue-template-compiler

그리고 그것은 매력적으로 작용했다.

node_modules 폴더는 삭제할 필요가 없습니다.

- vue@2.0.8 - vue-template-compiler@2.2.6

더 낮은 버전 번호로 패키지를 업데이트합니다.이 경우,npm update vue. 옵션으로,npm update vue-loader너무

[SOLVED!!]

나도 똑같은 소포에 갔었어.불만을 제기하고 있는 vue-module의 json 파일은 다음과 같이 패키지의 버전을 변경하고 yarn을 실행합니다.

_~/.config/sysp/global/node_sysp/vue-jscodeshift-sysp/node_sysp/vue-sysp/sysp/sysp.json_:

OLD:
  "name": "vue-template-compiler",
  "version": "2.6.11"
NEW:
  "name": "vue-template-compiler",
  "version": "2.6.10"

실행:

yarn

출처: https://github.com/vuejs/vue/issues/10932

주의: 패키지 경로.json 및 버전은 내 경우 고유합니다.

언급URL : https://stackoverflow.com/questions/43397688/how-do-i-fix-a-vue-packages-version-mismatch-error-on-laravel-spark-v4-0-9

반응형