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

Mismatching "lexical" dependency versions found: [email protected] #9134

Closed
gor3a opened this issue Nov 12, 2024 · 5 comments
Closed

Mismatching "lexical" dependency versions found: [email protected] #9134

gor3a opened this issue Nov 12, 2024 · 5 comments
Labels

Comments

@gor3a
Copy link

gor3a commented Nov 12, 2024

Describe the Bug

I used npx create-payload-app@beta after the setup and dev the app I got it

Error: Mismatching "lexical" dependency versions found: [email protected] (Please change this to 0.18.0). All "lexical" packages must have the same version. This is an error with your set-up, not a bug in Payload. Please go to your package.json and ensure all "lexical" packages have the same version.

Link to the code that reproduces this issue

npx create-payload-app@beta -t website

Reproduction Steps

  1. Run npx create-payload-app@beta
  2. Append the project name
  3. Append the supabase pq connection string
  4. Run project
  5. Get the error

Which area(s) are affected? (Select all that apply)

plugin: richtext-lexical, plugin: richtext-slate

Environment Info

Payload:3.0.0-beta.128
@gor3a gor3a added status: needs-triage Possible bug which hasn't been reproduced yet v3 validate-reproduction labels Nov 12, 2024
Copy link

Please add a reproduction in order for us to be able to investigate.

Depending on the quality of reproduction steps, this issue may be closed if no reproduction is provided.

Why was this issue marked with the invalid-reproduction label?

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We prefer a link to a public GitHub repository created with create-payload-app@beta -t blank or a forked/branched version of this repository with tests added (more info in the reproduction-guide).

To make sure the issue is resolved as quickly as possible, please make sure that the reproduction is as minimal as possible. This means that you should remove unnecessary code, files, and dependencies that do not contribute to the issue. Ensure your reproduction does not depend on secrets, 3rd party registries, private dependencies, or any other data that cannot be made public. Avoid a reproduction including a whole monorepo (unless relevant to the issue). The easier it is to reproduce the issue, the quicker we can help.

Please test your reproduction against the latest version of Payload to make sure your issue has not already been fixed.

I added a link, why was it still marked?

Ensure the link is pointing to a codebase that is accessible (e.g. not a private repository). "example.com", "n/a", "will add later", etc. are not acceptable links -- we need to see a public codebase. See the above section for accepted links.

Useful Resources

@OkanUnalll
Copy link

OkanUnalll commented Nov 12, 2024

I have same problem.

also when I create a project with the latest beta version, some places in the project have incorrect imports. Example:

Image

Something seems to be missing in the called npm packages.

I using v3.0.0-beta.127

@khnn
Copy link

khnn commented Nov 12, 2024

I had an issue that might be related as well. The LinkFeature stopped working and I ended up adding [email protected] as a dependency to my package.json. After deleting the lock file and reinstalling the packages, it worked again.

@akhrarovsaid
Copy link
Contributor

Hey @gor3a, @khnn, and @OkanUnalll,

I believe this was fixed as of beta.128 by this PR.

@AlessioGr
Copy link
Member

AlessioGr commented Nov 13, 2024

Closing, as this is now fixed in beta.128/129. We've also upgraded lexical to 0.20.0.

As I often see people struggling to get the correct dependencies installed, I'll include this little guide here ⬇


Here's the easiest and most reliable way to manage your packages, so that you have no dependency issues:

  1. upgrade all payload packages to beta.129 (or whatever the latest v3 payload version is). Be sure to, for all payload packages, specify "3.0.0-beta-129" in your package.json versions and not just "beta".
  2. if manually installed, upgrade all lexical dependencies to "0.20.0"
  3. remove all caret (^) symbols from your package.json. I have frequently seen incorrect versions being installed due to the caret.
  4. remove node_modules (and pnpm-lock.yaml if you still have issues)
  5. run pnpm install
  6. restart your IDE or TypeScript server

pnpm (recommended) is the most reliable package manager. npm is less stable than pnpm and slower. yarn v1 is unsupported. Modern yarn may be fine, though I have no personal experience with it.

If you're coming from beta 127 or earlier, please follow this migration guide: https://github.com/payloadcms/payload/releases/tag/v3.0.0-beta.128

@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants