X Tutup
The Wayback Machine - https://web.archive.org/web/20201025233512/https://github.com/nodejs/node/issues/35740
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

Update fs.md #35740

Closed
muzhaqi16 opened this issue Oct 21, 2020 · 1 comment
Closed

Update fs.md #35740

muzhaqi16 opened this issue Oct 21, 2020 · 1 comment
Labels
fs

Comments

@muzhaqi16
Copy link

@muzhaqi16 muzhaqi16 commented Oct 21, 2020

I thought it was the same thing as well but unfortunately when I use require('fs/promises') I do receive an error message on my node environment but not if I use the second option.

Error: Cannot find module 'fs/promises'
Require stack:

My node version is v12.18.3

Originally posted by @muzhaqi16 in #35726 (comment)

@aduh95
Copy link
Contributor

@aduh95 aduh95 commented Oct 21, 2020

The current documentation is only true for Node.js 14+. For Node.js 12, please check out https://nodejs.org/docs/latest-v12.x/api/fs.html#fs_fs_promises_api

For info, here is the support table for those features:

Node.js version range require('fs/promises') require('fs').promises
v10.0.0
≥v10.1.0 <14.0.0
≥14.0.0

Maybe we could add an history section in the docs to clarify what support users can expect.

aduh95 added a commit to aduh95/node that referenced this issue Oct 21, 2020
@aduh95 aduh95 mentioned this issue Oct 21, 2020
3 of 3 tasks complete
@PoojaDurgad PoojaDurgad added the fs label Oct 22, 2020
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Oct 22, 2020
Fixes: nodejs#35740

Refs: nodejs#31553
Refs: nodejs#32953
Refs: nodejs#34001
Refs: nodejs#34055
Refs: nodejs#34962

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
ExE-Boss added a commit to ExE-Boss/node that referenced this issue Oct 24, 2020
Fixes: nodejs#35740

Refs: nodejs#31553
Refs: nodejs#32953
Refs: nodejs#33991
Refs: nodejs#34001
Refs: nodejs#34055
Refs: nodejs#34962

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: Trivikram Kamat <trivikr.dev@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

3 participants
You can’t perform that action at this time.
X Tutup