-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Can’t import stream promises API with ECMAScript Modules #35731
Comments
PoojaDurgad
added
esm
Issues and PRs related to the ECMAScript Modules implementation.
stream
Issues and PRs related to the stream subsystem.
labels
Oct 21, 2020
This is because the Stream Promises API is only available from v15.0.0: #33991 |
The documentation and version history for streams should make this clear |
#34002 updated the documentation, now it’s just a matter of waiting for the website to be updated. |
This is mentioned on the website now: https://nodejs.org/dist/latest-v15.x/docs/api/stream.html#stream_streams_promises_api I believe the issue can be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
v12.17.0 (current LTS)
v14.14.0 (LTS in a few days)
Linux 5.4.0-51-generic
'stream'
What steps will reproduce the bug?
The documentation says:
Which is fine. However, when using the ESM syntax it does not work like other APIs like 'fs' or 'dns':
What is the expected behavior?
It should work just like 'fs' or 'dns' promises.
This issue is similar to #21014 or the fix in #32953
What do you see instead?
Throws a
SyntaxError
.Additional information
I have made a repo to demonstrate the issue. There are various syntaxes, but
2.js
shows the issue pretty well.The text was updated successfully, but these errors were encountered: