You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 4, 2024. It is now read-only.
I was originally wondering if it should be possible to import promises (which currently is a getter) from fs.
// index.mjsimport{promisesasfs}from'fs'
node --experimental-modules index.mjs
#(node:57314) ExperimentalWarning: The ESM module loader is experimental.#file:///test/index.mjs:6#import { promises as fs } from 'fs'# ^^^^^^^^#SyntaxError: The requested module 'fs' does not provide an export named 'promises'# at ModuleJob._instantiate (internal/modules/esm/module_job.js:80:21)
node -r esm index.mjs
# file:///test/index.mjs:1#SyntaxError: Missing export name 'promises' in ES module: fs# at file:///test/index.mjs:1
@jdalton after some research I saw your comment that this was planned for node: nodejs/node#20504 (comment) is this still the case and a bug in node and/or esm? or was it decided against to allow named imports of cjs getters?
not sure if this is intended, or a bug.
related to: from #516
I was originally wondering if it should be possible to import
promises(which currently is a getter) fromfs.@jdalton after some research I saw your comment that this was planned for node: nodejs/node#20504 (comment) is this still the case and a bug in
nodeand/oresm? or was it decided against to allow named imports of cjs getters?someone also did mention that it did work prior
nodev10.2 withesmnodejs/node#20504 (comment)