Skip to content

bug: Dependency error when starting a new project #30325

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

Closed
3 tasks done
betullam opened this issue Apr 1, 2025 · 2 comments
Closed
3 tasks done

bug: Dependency error when starting a new project #30325

betullam opened this issue Apr 1, 2025 · 2 comments
Labels
needs: reply the issue needs a response from the user

Comments

@betullam
Copy link

betullam commented Apr 1, 2025

Prerequisites

Ionic Framework Version

v8.x

Current Behavior

When starting a new blank project with ionic start for the React framework, I get a dependency error:

$ ionic start

...

> npm i --save -E @capacitor/haptics @capacitor/app @capacitor/keyboard @capacitor/status-bar
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: @capacitor/[email protected]
npm error node_modules/@capacitor/core
npm error   @capacitor/core@"6.2.1" from the root project
npm error
npm error Could not resolve dependency:
npm error peer @capacitor/core@">=7.0.0" from @capacitor/[email protected]
npm error node_modules/@capacitor/haptics
npm error   @capacitor/haptics@"*" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /home/username/.npm/_logs/2025-04-01T05_53_45_459Z-eresolve-report.txt
npm error A complete log of this run can be found in: /home/username/.npm/_logs/2025-04-01T05_53_45_459Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
        
        npm i --save -E @capacitor/haptics @capacitor/app @capacitor/keyboard @capacitor... exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

...

I think the problem is that capacitor/core is not yet available in Version 7.0.0. Anyway, a way to install the packages is using the --legacy-peer-deps option as suggested in the error message.

Expected Behavior

There should not be any dependency error.

Steps to Reproduce

  1. Install ionic as per the official docs
  2. Start a new project with ionic start
    • Don't use the "app creation wizard" (say "n")
    • Choose the "React" framework
    • Add a project name
    • Choose the "blank" starter template

Code Reproduction URL

not possible

Ionic Info

Ionic:

  • Ionic CLI : 7.2.1 (/home/username/.nvm/versions/node/v22.14.0/lib/node_modules/@ionic/cli)
  • Ionic Framework : @ionic/react 8.5.2

Utility:

  • cordova-res : not installed globally
  • native-run : 2.0.1

System:

  • NodeJS : v22.14.0 (/home/username/.nvm/versions/node/v22.14.0/bin/node)
  • npm : 11.2.0
  • OS : Linux 6.11

Additional Information

Some details about my system:

  • OS: Ubuntu 24.04.2
  • nvm version: 0.40.2
  • npm version: 11.2.0
  • node version: 22.14.0
  • ionic cli version: 7.2.1
  • ionic framework version: @ionic/react 8.5.2
@ionitron-bot ionitron-bot bot added the triage label Apr 1, 2025
@ShaneK
Copy link
Member

ShaneK commented Apr 3, 2025

Hey! I suspect this is an issue relating to an incident Capacitor had earlier this week where they accidentally identified 6.2.1 as latest. That has since been resolved. Please try again and see if the issue persists.

@ShaneK ShaneK added the needs: reply the issue needs a response from the user label Apr 3, 2025
@ionitron-bot ionitron-bot bot removed the triage label Apr 3, 2025
Copy link

ionitron-bot bot commented Apr 17, 2025

Thanks for the issue! This issue is being closed due to the lack of a reply. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Thank you for using Ionic!

@ionitron-bot ionitron-bot bot closed this as completed Apr 17, 2025
@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Apr 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs: reply the issue needs a response from the user
Projects
None yet
Development

No branches or pull requests

2 participants