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
When installing emmet on a project that uses ECMAScript module syntax (package.json with type: module), it throws the following error:
file:///home/thiago/Development/pessoal/emmet-example/dist/src/index.js:1
import { getInMemoryEventStore } from '@event-driven-io/emmett';
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Named export'getInMemoryEventStore' not found. The requested module '@event-driven-io/emmett' 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 '@event-driven-io/emmett';
const { getInMemoryEventStore } = pkg;
at ModuleJob._instantiate (node:internal/modules/esm/module_job:132:21)
at async ModuleJob.run (node:internal/modules/esm/module_job:214:5)
at async ModuleLoader.import (node:internal/modules/esm/loader:329:24)
at async loadESM (node:internal/process/esm_loader:28:7)
at async handleMainPromise (node:internal/modules/run_main:113:12)
Node.js v20.11.1
We need to investigate what's causing that and fix it.
Acceptance Criteria
On a fresh new repository / project, after installing emmet, we should be able to import artifacts from emmet as follows:
Description
When installing emmet on a project that uses ECMAScript module syntax (package.json with
type: module
), it throws the following error:We need to investigate what's causing that and fix it.
Acceptance Criteria
On a fresh new repository / project, after installing emmet, we should be able to import artifacts from emmet as follows:
Additional information
The text was updated successfully, but these errors were encountered: