1
0

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.

【Vue.js】Error compiling template: .. outside root element will be ignored.エラーの対処

Posted at

環境

PHP 7.3.8
Laravel 6.18.35
vue.js 2.6.12

対処法

[Vue warn]: Error compiling template:
text ""="">" outside root element will be ignored.

文字通りテンプレートのコンパイルエラーという事で、
template内にタグに囲まれていない部分があるという指摘です。

index.blade.php
//"が多い
<div style="width:calc(50% - .25rem);"">

//不要な"を削除
<div style="width:calc(50% - .25rem);">

これはvueファイル、コンポーネント内のテンプレだけでなく、読み込んでいるbladeでのタグ囲い漏れなども同様のエラーを検出します。

1
0
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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?