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

Closed
Annoiiyed opened this issue Dec 6, 2024 · 6 comments · Fixed by #70
Closed

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

Annoiiyed opened this issue Dec 6, 2024 · 6 comments · 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

@derrickmehaffy
Copy link
Member

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

image

@tomh4
Copy link

tomh4 commented Jan 2, 2025

So whats the workaround until its fixed?

@github-project-automation github-project-automation bot moved this from To be reviewed (Open) to Fixed/Shipped in Developer Experience Squad Jan 3, 2025
@tomh4
Copy link

tomh4 commented Jan 3, 2025

Great thanks @jhoward1994 , when can we expect a release ? :)

@derrickmehaffy
Copy link
Member

Great thanks @jhoward1994 , when can we expect a release ? :)

We always do our releases every Wednesday but were on a change freeze for the holidays, should resume next week.

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: Fixed/Shipped
Development

Successfully merging a pull request may close this issue.

6 participants