Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExperimentalWarning after update to 0.8.0 #177

Open
Tennyleaz opened this issue Dec 29, 2023 · 5 comments
Open

ExperimentalWarning after update to 0.8.0 #177

Tennyleaz opened this issue Dec 29, 2023 · 5 comments

Comments

@Tennyleaz
Copy link

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:  npm@10.2.5
- Builder:          -
- User Config:      devtools, app, css, modules, i18n, runtimeConfig
- Runtime Modules:  vuetify-nuxt-module@0.8.0, @pinia/nuxt@0.5.1, @nuxtjs/i18n@8.0.0
- Build Modules:    -
------------------------------

I would stick to 0.7.3 for now...

@userquin
Copy link
Owner

userquin commented Dec 29, 2023

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

@davidstackio
Copy link
Contributor

davidstackio commented Jan 2, 2024

I'm also getting this error.

Related PR: vuetifyjs/vuetify-loader#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:  npm@10.2.1
- Builder:          -
- User Config:      extends, nitro, modules, content, runtimeConfig
- Runtime Modules:  @nuxt/content@2.10.0, @pinia/nuxt@0.5.1
- Build Modules:    -
------------------------------

@kingyue737
Copy link

Not planned 😭 vuetifyjs/vuetify-loader#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
Copy link

We cannot pass arguments to Node in pnpm-scripts pnpm/pnpm#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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants