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

Error in package exports

Open
#3 1 comment 0 reactions 1 assignee View on GitHub

@tbeseda is already working on this.

Since Jan 5, 2023.

Assessment

This issue has not been assessed yet.

Description

Hi there!

I tried the fastify example on https://enhance.dev/docs/learn/deployment/fastify and getting a package export error from the arc-plugin-enhance package.

Here is the error I am getting:

node:internal/errors:464
    ErrorCaptureStackTrace(err);
    ^

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './src/http/any-catchall/index.mjs' is not defined by "exports" in /node_modules/@enhance/arc-plugin-enhance/package.json imported from /node_modules/@enhance/fastify-plugin/index.mjs
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:692:3)
    at packageResolve (node:internal/modules/esm/resolve:873:14)
    at moduleResolve (node:internal/modules/esm/resolve:929:18)
    at defaultResolve (node:internal/modules/esm/resolve:1044:11)
    at ESMLoader.resolve (node:internal/modules/esm/loader:422:30)
    at ESMLoader.getModuleJob (node:internal/modules/esm/loader:222:40)
    at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:40)
    at link (node:internal/modules/esm/module_job:75:36) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

I kind of fixed it locally by adding "./src/http/any-catchall/index.mjs": "./src/http/any-catchall/index.mjs" to the exports entry in the package.json file but wondered if this is the best way to do this?

Anyway, I am having a really good time playing with enhance! Nice work!

Dominant language
JavaScript
Stars
4
Forks
0
PR merge metrics
No merged PRs in 30d

Getting set up

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 enhance-dev/fastify-plugin

All issues in enhance-dev/fastify-plugin

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.