I have recently updated my nodejs version from version 14.16.0 to 20.10.0
So i have been updating all the packages to the latest version to overcome the compatibility issues.
While everything is good I found issue is throwing up:
file:///D:/Upgrade-SIR/upgradewebserver/nuxt/node_modules/c12/dist/index.mjs:308
res.config = options.jiti(res.configFile);
^
`Error: ParseError: D:\: Support for the experimental syntax 'importAttributes' isn't currently enabled (5:51):
Add @babel/plugin-syntax-import-attributes (https://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-import-attributes) to the 'plugins' section of your Babel config to enable parsing.
D:/Upgrade-SIR/upgradewebserver/nuxt/nuxt.config.js:5:50
at resolveConfig (file:///D:/Upgrade-SIR/upgradewebserver/nuxt/node_modules/c12/dist/index.mjs:308:24)
at loadConfig (file:///D:/Upgrade-SIR/upgradewebserver/nuxt/node_modules/c12/dist/index.mjs:117:40)
at async loadNuxtConfig (file:///D:/Upgrade-SIR/upgradewebserver/nuxt/node_modules/nuxt/node_modules/@nuxt/kit/dist/index.mjs:468:18)
at async loadNuxt (file:///D:/Upgrade-SIR/upgradewebserver/nuxt/node_modules/nuxt/dist/index.mjs:2266:19)
at async start (file:///D:/Upgrade-SIR/upgradewebserver/nuxt/server/index.js:36:15)
Node.js v18.19.0
[nodemon] app crashed - waiting for file changes before starting...
I have downloaded the package using:
yarn add --dev @babel/plugin-syntax-import-attributes
And added in the babelrc as follows
{
"plugins": ["@babel/plugin-syntax-import-attributes"]
}