Skip to content

components 3.6.1 build breaks with primereact/@primereact/styles 11.2.0 (password renamed to inputpassword) #375

Description

@cratis-direct

What's wrong

@cratis/components@3.6.1 (the latest published 3.x) fails to build/bundle against primereact@11.2.0 / @primereact/styles@11.2.0.

dist/esm/Styled/primeReactStyles.js imports:

import { styles as styles$E } from '@primereact/styles/password';

In @primereact/styles@11.2.0 the password subpath export was renamed to inputpassword (the Password component was renamed to InputPassword). The password subpath no longer exists, so any bundler that respects package.json exports (Vite/Rolldown, in our case) fails with:

[MISSING_EXPORT] "styles" is not exported by "__vite-optional-peer-dep:@primereact/styles/password:@cratis/components".
    ╭─[ node_modules/@cratis/components/dist/esm/Styled/primeReactStyles.js:47:10 ]
 47 │ import { styles as styles$E } from '@primereact/styles/password';
    │          ───┬──
    │             ╰──── Missing export

All other @primereact/styles/* subpaths that primeReactStyles.js imports from are present and unchanged between 11.1.0 and 11.2.0 — password/inputpassword is the only rename.

@cratis/components@3.6.1's peerDependencies declares "primereact": "^11.0.0", so npm/yarn happily resolves 11.2.0 as satisfying the range, but the package is not actually compatible with it.

How this was found

The Cratis/Samples nightly "Update Packages" workflow bumped primereact/@primereact/* from 11.1.0 to 11.2.0 in Arc/React, which broke the sample's vite build step: https://github.com/Cratis/Samples/actions/runs/36569188233

As a workaround, Samples is excluding primereact/@primereact/* from its automated dependency bumps until this is fixed (won't fix the underlying incompatibility, just stops CI from breaking again on the next auto-bump).

Suggested fix

  • Update Styled/primeReactStyles.js to import from @primereact/styles/inputpassword (matching the PrimeReact 11.2.0 rename), and/or
  • Tighten the primereact / @primereact/* peer dependency ranges in package.json (e.g. >=11.0.0 <11.2.0 or ^11.1.0) until the rename is handled, so an incompatible version can't silently resolve.

Repro

npm pack @primereact/styles@11.1.0 @primereact/styles@11.2.0
# extract both tarballs and diff — password/ was renamed to inputpassword/

Or install @cratis/components@3.6.1 alongside primereact@11.2.0, @primereact/styles@11.2.0, etc., and run a Vite production build importing anything from @cratis/components's styled entry point.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions