CJS and ESM issue
See original GitHub issueUsing this library with SvelteKit, I received the following error message:
svelte-notifications doesn't appear to be written in CJS, but also doesn't appear to be a valid ES module (i.e. it doesn't have "type": "module" or an .mjs extension for the entry point). Please contact the package author to fix.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:15 (11 by maintainers)
Top Results From Across the Web
Relative performance of CJS vs ESM #44186 - nodejs/node
ESM and CJS classes should have similar performance characteristics instead of ESM being 10x slower than CJS.
Read more >Node Modules at War: Why CommonJS and ES ... - Code Red
ESM and CJS are completely different animals. Superficially, ESM looks very similar to CJS, but their implementations couldn't be more different ...
Read more >What the heck are CJS, AMD, UMD, and ESM in Javascript?
CJS executes imports as it finds them, blocking until they finish. ESM waits to execute any code in a module until all of...
Read more >CommonJS (cjs) and Modules (esm): Import compatibility
You can import CommonJS (cjs) into ESM modules, and vice versa (esm into cjs). But one way is easier than the other.
Read more >Publish ESM and CJS in a single package - Anthony Fu
Some packages now ship pure-ESM packages advocating the ecosystem to move from CJS to ESM. While this might be the "right thing to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Guys I’m working on this. So far I haven’t spent much time but I hope I can fix this
Just in case it helps, same error here: