Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

not support ES module

Open
#911 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
node.js, typescript
Domain
cli, tooling

Research direction

Reproduce the failure with npx dts-gen -m ipfs-core --stdout and start at dts-gen/dist/run.js, where the stack trace shows the package is loaded. Trace how the command resolves ipfs-core and verify that the command no longer crashes with ERR_PACKAGE_PATH_NOT_EXPORTED when processing an ES module.

Written by the indexing model from the issue text.

Description

$ npx dts-gen -m ipfs-core --stdout
Unexpected crash! Please log a bug with the commandline you specified.
/Users/user/.npm/_npx/8ffe955cebeb71d5/node_modules/dts-gen/dist/run.js:154
throw e;
^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /Users/user/eth/orbitdb/orbitdb-demo-ts/node_modules/ipfs-core/package.json
at new NodeError (node:internal/errors:405:5)
at exportsNotFound (node:internal/modules/esm/resolve:362:10)
at packageExportsResolve (node:internal/modules/esm/resolve:642:13)
at resolveExports (node:internal/modules/cjs/loader:567:36)
at Module._findPath (node:internal/modules/cjs/loader:636:31)
at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at Object. (/Users/user/.npm/_npx/8ffe955cebeb71d5/node_modules/dts-gen/dist/run.js:82:67) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Dominant language
TypeScript
Stars
423
Forks
237
Avg merge
18h 18m
Merged PRs (30d)
11

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from microsoft/DefinitelyTyped-tools

All issues in microsoft/DefinitelyTyped-tools

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.