vuetify-nuxt-module icon indicating copy to clipboard operation
vuetify-nuxt-module copied to clipboard

ExperimentalWarning after update to 0.8.0

Open Tennyleaz opened this issue 1 year ago • 5 comments

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...

Tennyleaz avatar Dec 29 '23 02:12 Tennyleaz

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

userquin avatar Dec 29 '23 10:12 userquin

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:    -
------------------------------

davidstackio avatar Jan 02 '24 17:01 davidstackio

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.

kingyue737 avatar Jan 05 '24 03:01 kingyue737

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.

kingyue737 avatar Jan 29 '24 04:01 kingyue737

This can be closed as fixed in vite-plugin-vuetify v2.0.3

kingyue737 avatar Mar 15 '24 07:03 kingyue737

Yes, looks like it is working as of vite-plugin-vuetify v2.0.3.

davidstackio avatar Jun 04 '24 21:06 davidstackio