> For the complete documentation index, see [llms.txt](https://ja.docs.monaca.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ja.docs.monaca.io/toraburushtingu/purebyrogugarirdoworisu-vue-packages-version-mismatch-error.md).

# プレビューログがリロードを繰り返す (Vue packages version mismatch error)

## 対象

* Vue.jsとVue.jsに依存するライブラリ（ `vue-template-compiler` 、`vue-loader` など）を使用し、`package.json` でバージョンを固定していないプロジェクト。

## 事象

下記のエラーにより、プレビューログがリロードを繰り返す事象が発生します。

```
[webpack-cli] Error:

Vue packages version mismatch:

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.
```

## 原因

* `vue-template-compiler` 、`vue-loader` などのVue.js関連ライブラリのマイナーバージョンが更新された場合などに、プロジェクトで使用するVue.jsのバージョンと不整合が生じると、上記のエラーが起こります。

## 対応

* `package.json` を開き、`devDependencies` 及び `dependencies` に定義されているVue.js、関連ライブラリのバージョンから `^` を外してバージョンを固定します。

```
  "dependencies": {
    ・・・
    "vue": "^2.6.14",
    "vue-onsenui": "^2.6.4"
    ・・・
  },
  "devDependencies": {
     ・・・
    "vue-loader": "^15.9.8",
    "vue-template-compiler": "^2.6.14",
    ・・・
  }
```

↓

```
  "dependencies": {
    ・・・
    "vue": "2.6.14",
    "vue-onsenui": "2.6.4"
    ・・・
  },
  "devDependencies": {
     ・・・
    "vue-loader": "15.9.8",
    "vue-template-compiler": "2.6.14",
    ・・・
  }
```

* プレビューログより、プロジェクトの再構成を実行します。

![](/files/5uUNQhyMlMyevh69WVsP)

![](/files/KSmLEOK4JLhq6jhTlJUP)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ja.docs.monaca.io/toraburushtingu/purebyrogugarirdoworisu-vue-packages-version-mismatch-error.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
