Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign up
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.jsshows the issue pretty well.