vuetify-nuxt-module
vuetify-nuxt-module copied to clipboard
ExperimentalWarning after update to 0.8.0
I updated from 0.7.3 to 0.8.0, and get this npm warning at nuxt prepare/debug/build time:
ERROR (node:11982) ExperimentalWarning: Import assertions are not a stable feature of the JavaScript language. Avoid relying on their current behavior and syntax as those might change in a future version of Node.js.
(Use node --trace-warnings ... to show where the warning was created)
ERROR (node:11982) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
This is my project info:
$ npx nuxi info
Working directory: /home/leaz/workspace/my-project
Nuxt project info:
------------------------------
- Operating System: Linux
- Node Version: v20.9.0
- Nuxt Version: 3.9.0
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: devtools, app, css, modules, i18n, runtimeConfig
- Runtime Modules: [email protected], @pinia/[email protected], @nuxtjs/[email protected]
- Build Modules: -
------------------------------
I would stick to 0.7.3 for now...
I've sent DM to Kael a few days ago in nuxt discord channel (vuetify server): https://discord.com/channels/340160225338195969/696761883184595004/1189259211662708806
The change in vuetify vite plugin 2.0.1: https://github.com/vuetifyjs/vuetify-loader/blob/master/packages/shared/src/imports/getImports.ts#L2-L3
I'm also getting this error.
Related PR: https://github.com/vuetifyjs/vuetify-loader/pull/327
Nuxt project info: 12:22:08 PM
------------------------------
- Operating System: Windows_NT
- Node Version: v18.19.0
- Nuxt Version: 3.9.0
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: [email protected]
- Builder: -
- User Config: extends, nitro, modules, content, runtimeConfig
- Runtime Modules: @nuxt/[email protected], @pinia/[email protected]
- Build Modules: -
------------------------------
Not planned 😭 https://github.com/vuetifyjs/vuetify-loader/issues/326
I wonder if we can catch or suppress the console warning from Node.
I also failed to find a way to add Node option in CLI like --trace-warnings when using with Vite.
We cannot pass arguments to Node in pnpm-scripts https://github.com/pnpm/pnpm/issues/2097 . Instead, we can pass option via the NODE_OPTIONS env variable:
{
"scripts": {
"dev": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning' nuxt dev -o",
"build": "cross-env NODE_OPTIONS='--no-warnings=ExperimentalWarning' nuxt build",
},
}
This workaround is a little ugly since we need to add env before every script which runs nuxt.
This can be closed as fixed in vite-plugin-vuetify v2.0.3
Yes, looks like it is working as of vite-plugin-vuetify v2.0.3.