Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Failed to resolve entry for package "@intlify/shared"


i am facing an issue related to vue-i18n package during the build (npm run build)

[commonjs--resolver] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@intlify/shared" package
file: /home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vue-i18n/dist/vue-i18n.cjs.js
error during build:
Error: Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@intlify/shared" package
at packageEntryFailure (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vite/dist/node/chunks/dep-df561101.js:28691:11)
at resolvePackageEntry (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vite/dist/node/chunks/dep-df561101.js:28686:9)
at tryNodeResolve (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20)
at Object.resolveId (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28)
at file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/rollup/dist/es/shared/node-entry.js:25518:40
at async PluginDriver.hookFirstAndGetPlugin (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/rollup/dist/es/shared/node-entry.js:25418:28)
at async resolveId (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/rollup/dist/es/shared/node-entry.js:24091:26)
at async ModuleLoader.resolveId (file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/rollup/dist/es/shared/node-entry.js:24505:15)
at async file:///home/jtissa/Desktop/metronic/vue/metronic_vue_v8.2.0_demo7/demo7/node_modules/vite/dist/node/chunks/dep-df561101.js:8107:16
at async Promise.all (index 0)
ERROR: "build-only" exited with 1.


any ideas or solutions for this type of error??


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (7)


Hi,

Thank you for your feedback.

We have reproduced this error, and it seems to be an issue in the vue-i18n source code. We are working on an update to fix this problem, and it will be released as soon as possible.

In the meantime, as a temporary solution, you can manually update the vue-i18n dependency to version 9.2.2 in your package.json file:


"vue-i18n": "9.2.2",


For more details and updates regarding this error, please refer to the GitHub issue here.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



Thank you solved



Hi,

Glad to hear that. All the best with your project!

Please let us know if you have any further questions on this topic or anything else.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



I also got the same error.
PS C:\xampp\htdocs\vue\demo1> npm -v
10.1.0
PS C:\xampp\htdocs\vue\demo1> npm install

added 469 packages, and audited 470 packages in 2m

125 packages are looking for funding
run `npm fund` for details

2 vulnerabilities (1 low, 1 moderate)

To address issues that do not require attention, run:
npm audit fix

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.
PS C:\xampp\htdocs\vue\demo1> npm run dev

> demo1@8.2.0 dev
> vite


VITE v4.4.9 ready in 786 ms

➜ Local: http://localhost:5173/metronic8/vue/demo1/
➜ Network: use --host to expose
➜ press h to show help
X [ERROR] Failed to resolve entry for package "@intlify/shared". The package may have incorrect main/module/exports specified in its package.json: No known conditions for "." specifier in "@intlify/shared" package [plugin vite:dep-pre-bundle]

node_modules/esbuild/lib/main.js:1373:21:
1373 │ let result = await callback({
╵ ^

at packageEntryFailure (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:28691:11)
at resolvePackageEntry (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:28686:9)
at tryNodeResolve (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:28419:20)
at Context.resolveId (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:28180:28)
at Object.resolveId (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:44207:64)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:65837:21
at async file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:39941:34
at async requestCallbacks.on-resolve (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:1373:22)
at async handleRequest (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:729:13)

This error came from the "onResolve" callback registered here:

node_modules/esbuild/lib/main.js:1292:20:
1292 │ let promise = setup({
╵ ^

at setup (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:39921:19)
at handlePlugins (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:1292:21)
at buildOrContextImpl (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:978:5)
at Object.buildOrContext (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:786:5)
at C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:2186:68
at new Promise (<anonymous>)
at Object.context (C:\xampp\htdocs\vue\demo1\node_modules\esbuild\lib\main.js:2186:27)
at prepareEsbuildOptimizerRun (file:///C:/xampp/htdocs/vue/demo1/node_modules/vite/dist/node/chunks/dep-df561101.js:45967:35)

The plugin "vite:dep-pre-bundle" was triggered by this import

node_modules/vue-i18n/dist/vue-i18n.cjs:8:21:
8 │ var shared = require('@intlify/shared');
╵ ~~~~~~~~~~~~~~~~~



I tried editing "vue-i18n": "9.2.2", but still can't fix it. Hope to receive support soon!



Hi,

Do you still have this error?

This error should already be fixed by vue-i18n team. See Github issue.

If you still have this error or any other problems please create a new post using this form.

Regards,
Lauris Stepanovs,
Keenthemes Support Team



A few days ago I had to work on version 8.1.8
As per your instructions, I followed and got it working on version 8.2.0. Thank you very much!
VITE v4.4.9 ready in 888 ms

➜ Local: http://localhost:5173/metronic8/vue/demo1/
➜ Network: use --host to expose
➜ press h to show help


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(