## 事象 `nuxt`コマンドを実行すると以下のエラーが表示される。 ``` WARN Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugi n-proposal-private-methods. The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warn ing by explicitly adding ["@babel/plugin-proposal-private-property-in-object", { "loose": true }] to the "plugins" section of your Babel config. ``` ## 原因 ちゃんと調べていない。 ## 解決方法 `nuxt.config.js`に設定を追加する。 ```diff:nuxt.config.js build: { babel: { + plugins: [ + ['@babel/plugin-proposal-private-property-in-object', { loose: true }], + ], } } ``` ## 参考 <div class="link-card"> <div class="link-card-header"> <img src="https://github.githubassets.com/favicons/favicon.svg" class="link-card-site-icon"/> <span class="link-card-site-name">GitHub</span> </div> <div class="link-card-body"> <div class="link-card-content"> <div> <p class="link-card-title">Babel "loose" option error spamming in console on fresh project · Issue #9224 · nuxt/nuxt.js</p> </div> <div class="link-card-description"> Versions nuxt: v2.15.4 node: v14 Reproduction Just make a new project on CodeSandbox and you&#39;ll see the error. Here is one I just made: https://codesandbox.io/s/serene-thunder-yl6rq Steps to re... </div> </div> <img src="https://opengraph.githubassets.com/1eb54650fae4713bb355416589ef2fc4abbc207d2db7a610c4fe4c72ff93e67f/nuxt/nuxt.js/issues/9224" class="link-card-image"/> </div> <a href="https://github.com/nuxt/nuxt.js/issues/9224#issuecomment-893289291"></a> </div>