question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ESM build not working

See original GitHub issue

When building with vite, I’m getting this error:

[vite-plugin-pwa:build] Failed to resolve entry for package "fastest-levenshtein". The package may have incorrect main/module/exports specified in its package.json.
error during build:
Error: Failed to resolve entry for package "fastest-levenshtein". The package may have incorrect main/module/exports specified in its package.json.
"module": "./esm/mod.esm.js",

This file does not exist on the published version of fastest-levenshtein: https://unpkg.com/browse/fastest-levenshtein@1.0.14/

Hence the failure.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jdpowell1commented, Aug 2, 2022

All working now, thanks!

1reaction
RoXuScommented, Jul 28, 2022

Hey the following MR should fix this: https://github.com/ka-weihe/fastest-levenshtein/pull/20

Read more comments on GitHub >

github_iconTop Results From Across the Web

ESM build does not work in the browser ("debug") #912 - GitHub
Describe the bug The es module build ships bare module imports, which can be resolved using a dev server or other tool.
Read more >
Unable of get running a pure ESM node project - Stack Overflow
It does appear that you have another problem. You need to tell, not just TypeScript, but Node, how you plan to resolve modules....
Read more >
rollup.js
In addition to enabling the use of ES modules, Rollup also statically analyzes the code you are importing, and will exclude anything that...
Read more >
ts-node - npm
Start using ts-node in your project by running `npm i ts-node`. There are 7243 other projects in ... Why is this not built-in...
Read more >
Building for Production - Vite
When it is time to deploy your app for production, simply run the vite build command. ... loaded only in browsers that do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found