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

[bug]: Plugin init fails due to dependency conflict #68

Open
Annoiiyed opened this issue Dec 6, 2024 · 3 comments · May be fixed by #70
Open

[bug]: Plugin init fails due to dependency conflict #68

Annoiiyed opened this issue Dec 6, 2024 · 3 comments · May be fixed by #70
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: sdk-plugin status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@Annoiiyed
Copy link

What version of @strapi/sdk-plugin are you using?

NPM version: 10.5.0
Node version: v20.12.0
SDK version: 5.2.7

What's Wrong?

When the init script reaches the npm install phase, it fails due to a dependency tree conflict:

/home/[username]/.npm/_logs/2024-12-06T17_09_05_728Z-debug-0.log

# npm resolution error report

While resolving: [plugin name]@0.0.0
Found: [email protected]
node_modules/react
  dev react@"^19.0.0" from the root project

Could not resolve dependency:
peer react@"^17.0.0 || ^18.0.0" from @strapi/[email protected]
node_modules/@strapi/icons
  @strapi/icons@"^2.0.0-rc.14" from the root project
  peer @strapi/icons@"^2.0.0 || ^2.0.0-beta || ^2.0.0-alpha" from @strapi/[email protected]
  node_modules/@strapi/design-system
    @strapi/design-system@"^2.0.0-rc.14" 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.

To Reproduce

Simply run npx @strapi/sdki-plugin init plugin-name

Expected Behaviour

Init utility completes correctly

@Annoiiyed Annoiiyed added the issue: bug Issue reporting a bug label Dec 6, 2024
@feethamCooper
Copy link

Having the same issues :'(

@cody-fjorge
Copy link

cody-fjorge commented Dec 9, 2024

Getting the same error and cannot create a new plugin on my project even with a fresh install / new project

NPM version: 10.9.0
Node version: v22.11.0
SDK version: 5.5.0

@hanpaine hanpaine added severity: high If it breaks the basic use of the product source: sdk-plugin labels Dec 10, 2024
@github-project-automation github-project-automation bot moved this to To be reviewed (Open) in Developer Experience Squad Dec 10, 2024
@derrickmehaffy
Copy link
Member

Confirmed, we should not be setting @strapi/strapi as a dev dependency (and most certainly not with a ^)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: sdk-plugin status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
Status: To be reviewed (Open)
Development

Successfully merging a pull request may close this issue.

5 participants