Closed
Description
the dual packaging setup does not support esm version in node and cjs version does not do named exports correctly
import { getBIP44AddressKeyDeriver } from '@metamask/key-tree';
^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export 'getBIP44AddressKeyDeriver' not found. The requested module '@metamask/key-tree' 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 '@metamask/key-tree';
const { getBIP44AddressKeyDeriver } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:190:5)
More information about dual packaging here https://github.com/sheremet-va/dual-packaging.
Metadata
Metadata
Assignees
Labels
No labels