. Advertisement .
..3..
. Advertisement .
..4..
The error: “WARN Though the “loose” option was set to “false” in nuxt js 2.14.6” is a common error that can show up in many ways. In this blog, we will go through some of the ways you can fix this issue. Read on.
How To Solve The Error: “WARN Though the “loose” option was set to “false” in nuxt js 2.14.6”?
When installing Nuxt version 2.14.6, you may encounter 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.
Under the build section of your nuxt.config.js file, include the following line. You should revert nuxt to version 2.15.2 and wait for it to be fixed. While the above solution resolves the issue in the short term, those warnings on a fresh nuxt installation appear to be a bug to many people.
Approach 1:
We only need to activate loose: true in the build section of your nuxt.config.js file.
nuxt.config.js
build: {
babel:{
plugins: [
['@babel/plugin-proposal-private-methods', { loose: true }]
]
}
}
Approach 2:
The second option is to simply upgrade Nuxt to version 2.15.2. You should revert nuxt to version 2.15.2 and wait for it to be fixed. While the above solution resolves the issue in the short term, those warnings on a fresh nuxt installation appear to be a bug to many people.
Conclusion
We hope you enjoyed our article about the error. With this knowledge, we know that you can fix your error: “WARN Though the “loose” option was set to “false” in nuxt js 2.14.6” quickly by following these steps! If you still have any other questions about fixing this syntax error, please leave a comment below. Thank you for reading!
Leave a comment