You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug - FileUpload - @patternfly/react-core imports file-selector without declaring it #12729
Describe the problem FileUpload (packages/react-core/src/components/FileUpload/FileUpload.tsx) imports fromEvent from file-selector, but @patternfly/react-core doesn't list file-selector in its dependencies. It only resolves because react-dropzone depends on it and npm or Yarn's node-modules linker hoists it to the root node_modules.
How do you reproduce the problem?
Install an app that uses @patternfly/react-core with a strict layout, for example pnpm with nodeLinker: isolated and hoist: false, or pnpm's global virtual store (enableGlobalVirtualStore: true).
Bundle it (webpack or Rspack).
The build fails: Module not found: Can't resolve 'file-selector' in '.../@patternfly/react-core/dist/esm/components/FileUpload'.
Expected behavior @patternfly/react-core declares every package it imports, so it resolves in any node_modules layout.
Is this issue blocking you?
Workaround: hoist file-selector (pnpm hoistPattern/publicHoistPattern) or add it with packageExtensions.
Activity