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

(node:5859) ExperimentalWarning: The fs.promises API is experimental #97

Closed
dylang opened this issue Apr 24, 2020 · 3 comments
Closed

Comments

@dylang
Copy link

dylang commented Apr 24, 2020

It doesn't feel like a good practice to use experimental features in a public module.

(node:5859) ExperimentalWarning: The fs.promises API is experimental

When developers are getting that warning it's not easily known how to track it warnings down. It's also not a good practice to encourage developers to use --no-warnings to just avoid this warning because who knows what other warnings it could be hiding in the future.

This is caused by

// eslint-disable-next-line node/no-unsupported-features/node-builtins
const { createWriteStream, promises: fs } = require('fs')

We're importing const { promisify } = require('util') a few lines down, could we use that promisify on the vanilla fs callback methods, or switch to well-used async wrap modules like make-dir?

I'm an indirect user of this library: I'm getting this warning because a module I use imports a module that imports a module that imports this. 😅 But I'm happy to make a PR.

@dylang
Copy link
Author

dylang commented Apr 28, 2020

Seems like it's no longer experimental past v10.17 according to nodejs/node#29875, closing this!

@dylang dylang closed this as completed Apr 28, 2020
@AllanOricil
Copy link

AllanOricil commented May 19, 2020

I still have the warning when using this library. And my node is v12.13.1

@benjaminben
Copy link

This breaks on some systems! We're doing an installation using BrightSign players, these things are unfortunately locked to node version 10.0... is there a recommended version of this lib for node version <= 10.0?

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

3 participants