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

Dependency mismatch in v9.0.0-rc.1 #3152

Closed
shrpne opened this issue Oct 4, 2024 · 9 comments · Fixed by #3165
Closed

Dependency mismatch in v9.0.0-rc.1 #3152

shrpne opened this issue Oct 4, 2024 · 9 comments · Fixed by #3165

Comments

@shrpne
Copy link

shrpne commented Oct 4, 2024

Environment

  • Operating System: Darwin
  • Node Version: v20.17.0
  • Nuxt Version: 3.13.2
  • CLI Version: 3.14.0
  • Nitro Version: 2.9.7
  • Package Manager: [email protected]
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

On the local environment and on the stackblitz I have different errors, but both envs not working for me

On stackblitz I have Pre-transform error: compiler is null (x2)
https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-rt9kda?file=i18n%2Fi18n.config.ts

On the local I have

 [ERROR] No matching export in "node_modules/@intlify/shared/dist/shared.mjs" for import "incrementer"

    node_modules/@intlify/core-base/dist/core-base.mjs:6:121:
      6 │ ...mber, isPlainObject, assign, join, toDisplayString, isArray, incrementer, format as format$1, isPromise, isBoolean, warn, isRegExp, ...
        ╵                                                                 ~~~~~~~~~~~


 ERROR  error while updating dependencies:                                                                                             11:05:53 AM
Error: Build failed with 1 error:
node_modules/@intlify/core-base/dist/core-base.mjs:6:121: ERROR: No matching export in "node_modules/@intlify/shared/dist/shared.mjs" for import "incremented"

Describe the bug

v9 rc1 not run

Additional context

npm list @intlify/shared gives

└─┬ @nuxtjs/[email protected]
  ├─┬ @intlify/[email protected]
  │ └─┬ @intlify/[email protected]
  │   ├─┬ @intlify/[email protected]
  │   │ └── @intlify/[email protected]
  │   └── @intlify/[email protected]
  ├── @intlify/[email protected]
  ├─┬ @intlify/[email protected]
  │ ├─┬ @intlify/[email protected]
  │ │ ├─┬ @intlify/[email protected]
  │ │ │ └── @intlify/[email protected]
  │ │ └── @intlify/[email protected] deduped
  │ ├── @intlify/[email protected] deduped
  │ └─┬ @intlify/[email protected]
  │   └── @intlify/[email protected] deduped
  └─┬ [email protected]
    ├─┬ @intlify/[email protected]
    │ ├─┬ @intlify/[email protected]
    │ │ └── @intlify/[email protected] deduped
    │ └── @intlify/[email protected] deduped
    └── @intlify/[email protected] deduped

probably the issue with intlify/h3 which requires intlify/shared@9

Logs

No response

@BobbieGoede
Copy link
Collaborator

Thanks for reporting this issue, you're right it looks like we need to update deps in @intlify/h3 and publish a release.

In the meantime I think you can work around this issue by adding the following resolutions override to your package.json. You may need to refresh lockfiles for this to take effect.

	"resolutions": {
		"@intlify/core": "^10"
	},

@shrpne
Copy link
Author

shrpne commented Oct 4, 2024

I managed to pin versions on npm with

  "overrides": {
    "@intlify/h3": {
      "@intlify/core": "^10"
    },
    "@intlify/bundle-utils": {
      "@intlify/message-compiler": "^10"
    }
  }

@BobbieGoede BobbieGoede changed the title 9 rc1 not working Dependency mismatch in v9.0.0-rc.1 Oct 4, 2024
@BobbieGoede
Copy link
Collaborator

Ah sorry, resolutions is specific to pnpm, just setting the one override seems to be sufficient in my testing.

  "overrides": {
    "@intlify/h3": {
      "@intlify/core-base": "^10.0.3"
    }
  },

This issue should get resolved once intlify/h3#35 is merged, released (and updated in this module).

@gokhantaskan
Copy link

I'm getting a similar error:

✘ [ERROR] No matching export in "node_modules/.pnpm/@[email protected]/node_modules/@intlify/shared/dist/shared.mjs" for import "create"

    node_modules/.pnpm/@[email protected]/node_modules/@intlify/core-base/dist/core-base.mjs:6:42:
      6 │ import { getGlobalThis, hasOwn, isNumber, create, isObject, isString, isBoolean, warn, format as format$1, isFunction, ...

...

ERROR  [nuxt] [request error] [unhandled] [500] __vite_ssr_import_0__.create is not a function

My packages:

"@nuxtjs/i18n": "9.0.0-rc.2" => also tried "9.1.0"
"nuxt": "^3.14.1592"

Node.js version v20.18.1, pnpm version 9.12.3

I also tried to add the following to package.json:

"resolutions": {
    "@intlify/core": "^10"
  },

@7Koston
Copy link

7Koston commented Nov 28, 2024

@gokhantaskan Same. Have you managed to solve it?
upd.

  "pnpm": {
    "overrides": {
      "@intlify/core": "^10.0.5",
      "@intlify/core-base": "^10.0.5",
      "@intlify/shared": "^10.0.5",
      "@intlify/message-compiler": "^10.0.5"
    }
  }

Worked for me.

@BobbieGoede
Copy link
Collaborator

@gokhantaskan @7Koston

This issue should be resolved now as well, it was caused by a release having an incorrect tag, try refreshing your lockfiles and installing 🙏

Related intlify/vue-i18n#2037 (comment)

@hymair
Copy link

hymair commented Dec 22, 2024

@BobbieGoede I refreshed the lockfile, have all latest versions of all packages and still get this error.

"devDependencies": {
    "@nuxtjs/i18n": "^9.1.1",
    "nuxt": "^3.14.1592"
}

@BobbieGoede
Copy link
Collaborator

@hymair
Could you provide a minimal reproduction? 🙏

@hymair
Copy link

hymair commented Dec 22, 2024

I guess it's the eslint plugin? Output of pnpm why @intlify/core-base -r:

devDependencies:
@intlify/eslint-plugin-vue-i18n 3.2.0
└── @intlify/core-base 9.14.2

EDIT: Uninstalling and installing the eslint plugin again fixed the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants