sanity-io / plugin-kit

Enhanced Sanity.io plugin development experience.
MIT License
76 stars 7 forks source link

Initializing a new plugin fails on installation step with peer dependency error #260

Closed nkgentile closed 4 months ago

nkgentile commented 4 months ago

If you find a security vulnerability, do NOT open an issue. Email security@sanity.io instead.

Describe the bug

When running the initialization to create a new plugin, the script will fail on attempting to install the package dependencies when it encounters a peer dependency error (see error below).

To Reproduce

Steps to reproduce the behavior:

  1. Run `npx @sanity/plugin-kit@latest init test
  2. See error

Expected behavior

Successful installation

Screenshots If applicable, add screenshots to help explain your problem.

While resolving: sanity-plugin-test@1.0.0
Found: eslint@9.8.0
node_modules/eslint
  dev eslint@"^9.8.0" from the root project

Could not resolve dependency:
peer eslint@"^8.56.0" from @typescript-eslint/parser@7.17.0
node_modules/@typescript-eslint/parser
  dev @typescript-eslint/parser@"^7.17.0" from the root project
  peer @typescript-eslint/parser@"^7.0.0" from @typescript-eslint/eslint-plugin@7.17.0
  node_modules/@typescript-eslint/eslint-plugin
    dev @typescript-eslint/eslint-plugin@"^7.17.0" from the root project

Fix the upstream dependency conflict, or retry
this command with --force or --legacy-peer-deps
to accept an incorrect (and potentially broken) dependency resolution.

Which versions of Sanity are you using?

Run sanity versions in the terminal and copy-paste the result here.

What operating system are you using?

MacOS

Which versions of Node.js / npm are you running?

Run npm -v && node -v in the terminal and copy-paste the result here.

npm@10.8.1
node@22.4.1

Additional context

Add any other context about the problem here.

Security issue?

Any security issues should be submitted directly to security@sanity.io. In order to determine whether you are dealing with a security issue, ask yourself these two questions: