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.

Unable to build (and publish) ESM version of package

See original GitHub issue

cc @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:

Screen Shot 2020-06-18 at 8 40 38 AM

Any ideas on how to fix this?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
jsmithcommented, Jun 22, 2020

Ok I tested index.cjs.js using a simple node script and using jest. In addition, I tested index.es.js using vite. Everything seems to be working as expected 😃 I didn’t test everything but I can confirm that neverthrow can be imported as expected and that the subset of functionality I tested worked normally.

1reaction
jsmithcommented, Jun 22, 2020

Yay, I’ll test the new build later today! Thanks for publishing 😃

Read more comments on GitHub >

github_iconTop 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 >

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