intlify/vue-i18n

Nuxt Build Error : "create" is not exported by @intlify/shared

Closed this issue · 2 comments

Reporting a bug?

Looks like this happens since v10.0.5.

I had to delete my yarn.lock file to recreate one, then yarn automatically got the latest version

Now nuxi generate renders this error

node_modules/@intlify/core-base/dist/core-base.mjs (6:42): Error when using sourcemap for reporting an error: Can't resolve original location of error.
ℹ ✓ 1909 modules transformed.                                                                                                                                                                 9:53:22 AM

 ERROR  x Build failed in 4.15s                                                                                                                                                                9:53:22 AM


[9:53:22 AM]  ERROR  Nuxt Build Error: node_modules/@intlify/core-base/dist/core-base.mjs (6:42): "create" is not exported by "node_modules/@intlify/shared/dist/shared.mjs", imported by "node_modules/@intlify/core-base/dist/core-base.mjs".
file: /PROJECT_PATH/node_modules/@intlify/core-base/dist/core-base.mjs:6:42

4:   * Released under the MIT License.
5:   */
6: import { getGlobalThis, hasOwn, isNumber, create, isObject, isString, isBoolean, warn, format as format$1, isFunction...
                                             ^
7: import { detectHtmlTag, defaultOnError, baseCompile as baseCompile$1, COMPILE_ERROR_CODES_EXTEND_POINT, createCompile...
8: export { CompileErrorCodes, createCompileError } from "@intlify/message-compiler";


  file: node_modules/@intlify/core-base/dist/core-base.mjs:6:42
  
  4:   * Released under the MIT License.
  5:   */
  6: import { getGlobalThis, hasOwn, isNumber, create, isObject, isString, isBoolean, warn, format as format$1, isFunction...
  ^
  7: import { detectHtmlTag, defaultOnError, baseCompile as baseCompile$1, COMPILE_ERROR_CODES_EXTEND_POINT, createCompile...
  8: export { CompileErrorCodes, createCompileError } from "@intlify/message-compiler";
  
  at getRollupError (node_modules/rollup/dist/es/shared/parseAst.js:396:41)
  at error (node_modules/rollup/dist/es/shared/parseAst.js:392:42)
  at Module.error (node_modules/rollup/dist/es/shared/node-entry.js:15593:16)
  at Module.traceVariable (node_modules/rollup/dist/es/shared/node-entry.js:16042:29)
  at ModuleScope.findVariable (node_modules/rollup/dist/es/shared/node-entry.js:13825:39)
  at Identifier.bind (node_modules/rollup/dist/es/shared/node-entry.js:5071:40)
  at CallExpression.bind (node_modules/rollup/dist/es/shared/node-entry.js:2658:23)
  at CallExpression.bind (node_modules/rollup/dist/es/shared/node-entry.js:11289:15)
  at VariableDeclarator.bind (node_modules/rollup/dist/es/shared/node-entry.js:2658:23)
  at VariableDeclaration.bind (node_modules/rollup/dist/es/shared/node-entry.js:2654:28)

Expected behavior

No build error

Reproduction

Use Nuxt 3 and install latest version of @nuxtjs/i18n

Rebuild the yarn.lock file

System Info

npm 10.8.2

node v20.11.0

yarn 4.5.0

nuxt 3.14.159

@nuxtjs/i18n ^9.1.0

Screenshot

No response

Additional context

No response

Validations

Thank you for your reporting!

Sorry, that was a mistake in the tagging at the time of my release. I have just tagged latest as 10.0.5.
Please try to remove the lock file in your package manager and re-install your project.

It's working now :) thanks a lot for the quick fix