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
Module not found: Error: Package path ./locale-data is not exported from package /node_modules/@formatjs/intl-displaynames (see exports field in @formatjs/intl-displaynames/package.json) #4127
Comments
please pin to the previous versions while we're investigating |
The same error too, |
With this in the "./locale-data": {
"default": "./locale-data"
}, Also, adding this (with "./locale-data/*.js": {
"types": "./locale-data/*.d.ts",
"default": "./locale-data/*.js"
}, |
Same with the latest release, about intl-listformat and my Component:
No success with #4127 (comment) No errors with:
|
…t-parser,@formatjs/intl-displaynames,@formatjs/intl-listformat,intl-messageformat,@formatjs/ecma402-abstract,@formatjs/intl-numberformat,@formatjs/icu-skeleton-parser): Revert esm conditional exports (#4129) The ESM export chanegs are not properly tested and therefore broke in various scenarios. Fixes #4128, #4127, #4126 This reverts commit e0d593c.
Sorry for breaking your build. The newer version should include the ESM export revert. See also: #4126 (comment) |
No worries, thanks for your work. |
@formatjs/intl-displaynames: ^6.4.0,
react-intl: ^6.4.3,
typescript: ^5.1.3,
webpack: ^5.85.1"
tsconfig options:
"compilerOptions": { "module": "esnext", "moduleResolution": "node", }
https://formatjs.io/docs/polyfills/intl-displaynames#dynamic-import--capability-detection
after latest update dynamic loading of locale-data doesn't work.
the same error for @formatjs/intl-numberformat and @formatjs/intl-datetimeformat.
i suppose this is related to wildcard exports property in package.json.
"./locale-data/*": { "types": "./locale-data/*.d.ts", "default": "./locale-data/*.js" },
error thrown only when using dynamic import,
import ar from "@formatjs/intl-displaynames/locale-data/ar";
works fineThe text was updated successfully, but these errors were encountered: