Provide a general summary of the issue here
react-aria-components/i18n imports @internationalized/string, but react-aria-components does not declare @internationalized/string as a direct dependency. This can fail under package managers/install layouts that do not make transitive dependencies available to packages that did not declare them.
I searched existing issues/PRs for @internationalized/string, react-aria-components i18n dependency pnpm, and LocalizedStringDictionary and did not find an existing report for this packaging issue.
🤔 Expected Behavior?
Importing react-aria-components/i18n should resolve all packages that react-aria-components imports internally from dependencies declared by react-aria-components.
😯 Current Behavior
With pnpm, importing the i18n entry can fail with:
Error: Cannot find package '@internationalized/string' imported from .../node_modules/react-aria-components/i18n/index.mjs
Did you mean to import "@internationalized/string/dist/index.cjs"?
The published package's i18n/index.mjs imports it directly:
import {LocalizedStringDictionary} from '@internationalized/string';
But react-aria-components@1.17.0 does not list @internationalized/string in dependencies. I also checked the current main package metadata through the GitHub API (packages/react-aria-components/package.json), and react-aria-components@1.18.0 still appears to omit it from dependencies.
💁 Possible Solution
Declare @internationalized/string as a dependency of react-aria-components.
The pnpm workaround is:
packageExtensions:
react-aria-components@*:
dependencies:
"@internationalized/string": 3.2.8
🔦 Context
This came up while running tests in a pnpm monorepo using react-aria-components@1.17.0 transitively. pnpm why @internationalized/string showed the package present elsewhere in the graph via react-aria/react-stately, but it was not available to react-aria-components/i18n because react-aria-components itself did not declare it.
💻 Code Sample
A minimal repro should be any strict/isolated pnpm install that imports the i18n entry without hoisting transitive dependencies for undeclared imports:
import {LocalizedStringProvider} from 'react-aria-components/i18n';
🌍 Your Environment
| Software |
Version |
| react-aria-components |
1.17.0 |
| pnpm |
11.6.0 |
| Node |
25.9.0 |
Provide a general summary of the issue here
react-aria-components/i18nimports@internationalized/string, butreact-aria-componentsdoes not declare@internationalized/stringas a direct dependency. This can fail under package managers/install layouts that do not make transitive dependencies available to packages that did not declare them.I searched existing issues/PRs for
@internationalized/string,react-aria-components i18n dependency pnpm, andLocalizedStringDictionaryand did not find an existing report for this packaging issue.🤔 Expected Behavior?
Importing
react-aria-components/i18nshould resolve all packages thatreact-aria-componentsimports internally from dependencies declared byreact-aria-components.😯 Current Behavior
With pnpm, importing the i18n entry can fail with:
The published package's
i18n/index.mjsimports it directly:But
react-aria-components@1.17.0does not list@internationalized/stringindependencies. I also checked the currentmainpackage metadata through the GitHub API (packages/react-aria-components/package.json), andreact-aria-components@1.18.0still appears to omit it fromdependencies.💁 Possible Solution
Declare
@internationalized/stringas a dependency ofreact-aria-components.The pnpm workaround is:
🔦 Context
This came up while running tests in a pnpm monorepo using
react-aria-components@1.17.0transitively.pnpm why @internationalized/stringshowed the package present elsewhere in the graph viareact-aria/react-stately, but it was not available toreact-aria-components/i18nbecausereact-aria-componentsitself did not declare it.💻 Code Sample
A minimal repro should be any strict/isolated pnpm install that imports the i18n entry without hoisting transitive dependencies for undeclared imports:
🌍 Your Environment