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

ERR_PACKAGE_PATH_NOT_EXPORTED when using @intlify/vite-plugin-vue-i18n with @intlify/[email protected] #2138

Closed
4 tasks done
jieme opened this issue Mar 18, 2025 · 3 comments
Labels
Status: Review Needed Request for review comments

Comments

@jieme
Copy link

jieme commented Mar 18, 2025

Reporting a bug?

Description:

After installing dependencies for @intlify/vite-plugin-vue-i18n, the application fails to start due to an Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined.

Investigation:

The issue stems from @intlify/[email protected] (installed via the next tag), which appears to have an invalid/missing exports field in its package.json.

The dependency tree shows @intlify/vite-plugin-vue-i18n relies on @intlify/shared@next, which resolves to the alpha version.

Steps to Reproduce:

Install @intlify/vite-plugin-vue-i18n.

Dependencies install @intlify/[email protected] (via next).

Run the application (e.g., via vite dev).

Error Log:

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /node_modules/@intlify/shared/package.json

Possible Causes:

The alpha version of @intlify/shared (12.0.0-alpha.1) may have misconfigured exports in package.json.

Compatibility issues between @intlify/vite-plugin-vue-i18n and the alpha version of @intlify/shared.

Could the maintainers verify if the next tag should point to a stable version compatible with @intlify/vite-plugin-vue-i18n?

Is there a workaround (e.g., pinning @intlify/shared to a stable version) until this is resolved?

Expected behavior

Dependencies resolve correctly without package export errors.

Reproduction

none

System Info

Node.js version:  v18.20.3

Package manager: [email protected]

OS: Windows 11

Screenshot

Image

Additional context

No response

Validations

@jieme jieme added the Status: Review Needed Request for review comments label Mar 18, 2025
@jieme
Copy link
Author

jieme commented Mar 18, 2025

Image

@jieme
Copy link
Author

jieme commented Mar 19, 2025

As a temporary solution, add the following configuration to your package.json:
Image

"pnpm": { "overrides": { "@intlify/vite-plugin-vue-i18n@6>@intlify/shared": "^11.0.0", "@intlify/bundle-utils>@intlify/shared": "^11.0.0", "@intlify/bundle-utils>@intlify/message-compiler": "^11.0.0" }

@kazupon
Copy link
Member

kazupon commented Mar 19, 2025

Unfortunately, @intlify/vite-plugin-vue-i18n has been already deprecated
You can switch to @intlify/unplugin-vue-i18n easily.
please check it out.
https://github.com/intlify/bundle-tools/tree/main/packages/unplugin-vue-i18n

@kazupon kazupon closed this as completed Mar 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Review Needed Request for review comments
Projects
None yet
Development

No branches or pull requests

2 participants