Hello Guys, How are you all? Hope You all Are Fine. Today when I Installed nuxt version 2.14.6 and I would like to silence an error In Nuxt js. So Here I am Explain to you all the possible solutions here.
Without Wasting your time, Lets start This Article to Solve This Error.
How WARN Though the “loose” option was set to “false” in nuxt js 2.14.6 Error Occurs ?
Today when I Installed nuxt version 2.14.6 and I would like to silence an error In Nuxt js.
WARN Though the "loose" option was set to "false" in your @babel/preset-env co
The "loose" option must be the same for @babel/plugin-proposal-class-properties,
["@babel/plugin-proposal-private-methods", { "loose": true }]
to the "plugins" section of your Babel config.
How To Solve WARN Though the “loose” option was set to “false” in nuxt js 2.14.6 Error ?
Question: How To Solve WARN Though the “loose” option was set to “false” in nuxt js 2.14.6 Error ?
Answer: Add the following to your nuxt.config.js
file under the build
section. I’d rather reset nuxt
back to 2.15.2
and wait until it’s fixed. While the above answer fixes it in the short run, those warnings on a fresh nuxt install look like a bug to me.
Solution 1
Simple Error. We just have to enable loose: true in your nuxt.config.js
file under the build
section.
nuxt.config.js
build: {
babel:{
plugins: [
['@babel/plugin-proposal-private-methods', { loose: true }]
]
}
}
Solution 2
Second Solution is just update nuxt version to 2.15.2. I’d rather reset nuxt
back to 2.15.2
and wait until it’s fixed. While the above answer fixes it in the short run, those warnings on a fresh nuxt install look like a bug to me.
Summery
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also Read