-
Notifications
You must be signed in to change notification settings - Fork 384
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: The fs.promises API is experimental #392
Comments
Hi @kriskate! Thanks for the bug report. Given that you're using ES6 modules can you also provide details on how you are using them? E.g. are you using babel or TypeScript, and if so, what versions. Secondly can you run with the Node.js |
From @kriskate on June 25, 2018 23:39 Hey, thanks for the prompt response.
|
Thanks! I believe this is an issue in the google-auth-library module so I am going to move the issue there. |
This is due to use of We should avoid using |
We should also look into a lint rule to prevent this from happening elsewhere. |
I actually changed this back to a * import in #382 🤣 Synthetic imports on node core libraries only seem to work if downstream TypeScript users also have enabled synthetic imports. The warning is harmless FWIW. |
The warning is disconcerting for users. I see #382. We should drop |
Wouldn't importing from Alternatively, maybe using |
@kriskate we actually do not use Similarly, we cannot use |
The experimentalWarning seems to be fixed with Node 10.2.0+ due to nodejs/node#20403. |
Just so I'm clear - @ofrobots is the desired fix here then named imports from fs? |
Actually I am not sure any more given then observation in #392 (comment). If this is no longer a problem with recent Node 10, I am not sure if there is any change necessary. |
As a solution to my problem, which was that Winston was logging this error to Stackdriver through the plug-in, I was using previous version of node (pre-promises) for my builds; I've now switched to node version For me, the issue is not there anymore, although there might still be CIs out there that use a node version which outputs the error. PS: This doesn't change the fact that building TS projects with the same configuration and style of the projects this issue has been moved through might add unnecessary methods/ blocks of code to the project. |
@kriskate can you elaborate on what you mean here? While I do think it is slightly better to use named imports rather than doing The spurious experimental warning was an issue in Node that has since been fixed, so I do not think there is anything more actionable here. |
Well, I haven't dwelled into all the TS hype, but from what I can tell, somehow the combination of config flags and import style used for compiling google-auth-library-nodejs accessed Anyway, thank you very much for helping me fix this, not to mention for developing these utils 😃🍻 |
For anyone this might be useful for: |
From @kriskate on June 25, 2018 21:56
Environment details
@google-cloud/logging-winston
version: 0.9.0Steps to reproduce
import { LoggingWinston } from'@google-cloud/logging-winston'
I receive the console error
(node:27103) ExperimentalWarning: The fs.promises API is experimental
which is unfortunate because I'm redirecting the console to the logger and always get this error in Stackdriver as well
Copied from original issue: googleapis/nodejs-logging-winston#105
The text was updated successfully, but these errors were encountered: