Skip to content

SyntaxError: import not found: EventEmitter #2338

Discussion options

You must be logged in to vote

Great find! There are a few older npm packages like this that can't be scanned properly for ESM conversion, so they only expose a default export. In this case, you need to do:

import events from 'events';
const {EventEmitter} = events;

But I'll go ahead and add this package to a list that we keep internally in Snowpack. In the next release, your code snippet above should work.

977621d

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@gweiermann
Comment options

@feugy
Comment options

@feugy
Comment options

@PixsaOJ
Comment options

@PixsaOJ
Comment options

Answer selected by gweiermann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants