Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] package subpath error #2820

Closed
marionnegp opened this issue Aug 8, 2024 · 1 comment
Closed

[bug] package subpath error #2820

marionnegp opened this issue Aug 8, 2024 · 1 comment
Assignees
Labels
bug priority: low Severity level: 3

Comments

@marionnegp
Copy link
Collaborator

marionnegp commented Aug 8, 2024

Description of the issue

When running npm run serve in the red-hat-design-system repo, terminal shows this error:

node:internal/process/esm_loader:40
      internalBinding('errors').triggerUncaughtException(
                                ^
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './custom-elements-manifest/lib/Manifest.js' is not defined by "exports" in /Users/mapatel/Sites/red-hat-design-system/node_modules/@patternfly/pfe-tools/package.json imported from /Users/mapatel/Sites/red-hat-design-system/scripts/playgrounds.ts
    at exportsNotFound (node:internal/modules/esm/resolve:294:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:641:9)
    at packageResolve (node:internal/modules/esm/resolve:827:14)
    at moduleResolve (node:internal/modules/esm/resolve:901:20)
    at defaultResolve (node:internal/modules/esm/resolve:1121:11)
    at nextResolve (node:internal/modules/esm/hooks:865:28)
    at resolve (file:///Users/mapatel/Sites/red-hat-design-system/node_modules/tsx/dist/esm/index.mjs?1723134362329:2:3893)
    at async nextResolve (node:internal/modules/esm/hooks:865:22)
    at async Hooks.resolve (node:internal/modules/esm/hooks:303:24)
    at async handleMessage (node:internal/modules/esm/worker:196:18) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}

Node.js v20.10.0
❌ [playgrounds] Failed with exit status 1

Steps to reproduce

I'm seeing this error specifically from the feat/rh-icon branch in the red-hat-design-system repo.

  1. Open the feat/rh-icon branch
  2. If ./custom-elements-manifest/lib/Manifest.js is not in node_modules > @patternfly > pfe-tools > package.json file, run npm run serve

Expected behavior

Terminal should say something like Server at http://localhost:8080/ and allow me to view a preview of ux.redhat.com

@marionnegp marionnegp added priority: low Severity level: 3 bug labels Aug 8, 2024
@marionnegp marionnegp changed the title [bug] package subpath lop;['] [bug] package subpath error Aug 8, 2024
@bennypowers bennypowers self-assigned this Aug 9, 2024
@bennypowers
Copy link
Member

I'd like to resolve this by exporting constructor functions (like getAllProjectManifests) from a pfe-tools custom elements manifest entrypoint module

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug priority: low Severity level: 3
Projects
None yet
Development

No branches or pull requests

2 participants