Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Error in package exports

Aperta
#3 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

@tbeseda ci sta già lavorando.

Dal 5/1/2023.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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!

Lingua principale
JavaScript
Stelle
4
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di enhance-dev/fastify-plugin

Tutte le issue di enhance-dev/fastify-plugin

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.