-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
Closed
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.
Description
- Version:
v16.0.0-nightly20201030e8fe38f7cf
- Platform: Windows 10 x64 20H2
Starting from the version v16.0.0-nightly20201030e8fe38f7cf
I experience the issue with named import of Dropbox
:
import {Dropbox} from "dropbox";
^^^^^^^
SyntaxError: Named export 'Dropbox' not found. The requested module 'dropbox' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'dropbox';
const {Dropbox} = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:98:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:143:5)
at async Loader.import (node:internal/modules/esm/loader:165:24)
at async Object.loadESM (node:internal/process/esm_loader:68:5)
Process finished with exit code 1
If I rollback to the previous nightly build v16.0.0-nightly20201029bec918fb9b
, then everything is perfectly working. Therefore, I assume that the issue can be in Node.js and not in the way I import the package or in Dropbox
itself.
Can it be somehow related to the Node.js transition to ecmaVersion 2021?
DerekNonGeneric and andreasvirkus
Metadata
Metadata
Assignees
Labels
esmIssues and PRs related to the ECMAScript Modules implementation.Issues and PRs related to the ECMAScript Modules implementation.moduleIssues and PRs related to the module subsystem.Issues and PRs related to the module subsystem.