Unable to build (and publish) ESM version of package
See original GitHub issuecc @jsmith
I was going to publish the latest version of neverthrow
to npm via a beta
flag to sanity check for any breaking changes and was unable to build out the package.
See the following screenshot:
Any ideas on how to fix this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
ESBuild Fails to Resolve ESM Module from node_modules ...
esbuild@0.11.23 is building a module that includes this code... import ... ESM Module from node_modules from hints in package.json #1754.
Read more >Yarn won't publish/add both ESM and CJS versions of package?
I found that my build process locally produced both outputs but the tarball produced by yarn publish only contained dist/cjs/* .
Read more >Publish ESM and CJS in a single package - Anthony Fu
A short tutorial of shipping both ESM and CJS dual formats in a single NPM package.
Read more >How to Create a Hybrid NPM Module for ESM and CommonJS.
After trying and failing everything including this https://webpack.js.org/guides/package-exports/#providing-commonjs-and-esm-version-stateful. I ...
Read more >Publishing Node modules with TypeScript and ES modules
Tools that support this will be able to use this version of our package. So this should be set to ./lib/esm/index.js ...
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
Ok I tested
index.cjs.js
using a simple node script and using jest. In addition, I testedindex.es.js
usingvite
. Everything seems to be working as expected 😃 I didn’t test everything but I can confirm thatneverthrow
can be imported as expected and that the subset of functionality I tested worked normally.Yay, I’ll test the new build later today! Thanks for publishing 😃