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

ERROR (node:52837) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated #405

Open
pochat opened this issue Apr 27, 2024 · 10 comments
Labels

Comments

@pochat
Copy link

pochat commented Apr 27, 2024

Environment

  • Operating System: Darwin
  • Node Version: v22.0.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: npm@10.6.0
  • Builder: -
  • User Config: devtools
  • Runtime Modules: -
  • Build Modules: -

Reproduction

-Install latest node
-Install latest nuxt
-npm run dev

Describe the bug

When upgrading to the latest node and the lastest nuxt version, the following error repeatedly appears in the console:
ERROR (node:52865) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated

The error is present at every npm run dev, and npm run build.

Additional context

No response

Logs

No response

@Infectious-Smile
Copy link

+1

@xiao-xiaozi
Copy link

use node version v19.2.0 can clear this error info

@RobinTail
Copy link

Odd versions of Node are not for production use, @xiao-xiaozi .
Use 20.x instead of 19, it's LTS now, and there should not be that deprecation warning.
https://github.com/nodejs/Release

@RobinTail
Copy link

ERROR (node:52865) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated

Why deprecation warning causes the error in nuxt?
Is there some configuration for that, @pochat ?

@ExEr7um
Copy link

ExEr7um commented Apr 30, 2024

ERROR (node:52865) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated

Why deprecation warning causes the error in nuxt?

Is there some configuration for that, @pochat ?

I don't think it causes any errors, just a simple warning.

@manniL
Copy link
Member

manniL commented Apr 30, 2024

For now, this is just a warning and can be ignored. ☺️

@danielroe danielroe transferred this issue from nuxt/nuxt Apr 30, 2024
@danielroe
Copy link
Member

This is an upstream issue (wooorm/import-meta-resolve#27) which is resolved in v4.1.0 of import-meta-resolve, but because nuxi inlines mlly, and mlly inline import-meta-resolve, it may take a little while for the fix to percolate downward into Nuxt.

cc: @pi0

@pi0
Copy link
Member

pi0 commented May 1, 2024

wroking on mlly release expect it shortly :)

@igalklebanov
Copy link

@pi0 thank you! 💪

can we get a bump @ https://github.com/unjs/pkg-types ? still uses 1.6.1.

@manniL
Copy link
Member

manniL commented May 4, 2024

@pi0 thank you! 💪

can we get a bump @ unjs/pkg-types ? still uses 1.6.1.

refreshing the lockfile should be enough as it uses the ^1.6.1 constraint

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

No branches or pull requests

9 participants