Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What are the problem?

More than 1 year has passed since last update.

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

環境

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でのタグ囲い漏れなども同様のエラーを検出します。

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
0
Help us understand the problem. What are the problem?