1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【エラー備忘録】コンソール にtypeerror vue.use is not a function laravelと出る

Last updated at Posted at 2021-03-30

状況

Laravelでアプリケーションを作成している時のこと。

サーバーを起動してlocalhost:8000を開くが、画面に何も表示されない。
検証ツールでコンソールを見てみると、

typeerror Vue.use is not a function laravel

と出ている。

原因・解決策

関数が定義されていないか、定義したのに読み込まれていないと考え、問題点を探る。

resources/js/app.jsにて

Vue.use(VueRouter);

という記述しているが、先頭に

import Vue from 'vue'

をインポートしていなかったので書き加えたところ、正常に表示できた。

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?