Ionic Capcitor build Android unable to resolve dependency tree - ionic-framework

I am receiving an error when attempting to run ionic capacitor build android (details below):
PS C:\Users\User\source\repos\imango\src> ionic capacitor build android
npm.cmd i -E #capacitor/android#latest
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: mango#0.0.1
npm ERR! Found: #capacitor/core#3.7.0
npm ERR! node_modules/#capacitor/core
npm ERR! #capacitor/core#"^3.5.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #capacitor/core#"^4.0.0" from #capacitor/android#4.0.1
npm ERR! node_modules/#capacitor/android
npm ERR! #capacitor/android#"4.0.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\User\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\User\AppData\Local\npm-cache_logs\2022-08-06T22_53_19_523Z-debug-0.log
[ERROR] An error occurred while running subprocess npm.
npm.cmd i -E #capacitor/android#latest exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.

Your capacitor cli version is still set at 3.6.0 in your
devDependencies, try changing that to ^4.0.1 and clearing your
node_modules and removing your package-lock.json and run npm install
again.
Check this
Copied from her:
https://github.com/ionic-team/capacitor/issues/5812

Related

Peer Dependency error while deploying to Vercel

I am trying to deploy my NextJS application onto Vercel but each time at the deploy stage, I am met with these errors and the deployment will fail:
Previous build cache not available
Cloning completed: 426.52ms
Running "vercel build"
Vercel CLI 28.6.0
Installing dependencies...
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: react-typed#1.2.0
npm ERR! Found: react#18.2.0
npm ERR! node_modules/react
npm ERR! react#"18.2.0" from the root project
npm ERR! peer react#"^18.2.0" from next#13.0.5
npm ERR! node_modules/next
npm ERR! next#"13.0.5" from the root project
npm ERR! 3 more (react-dom, react-icons, styled-jsx)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.3.0" from react-typed#1.2.0
npm ERR! node_modules/react-typed
npm ERR! react-typed#"^1.2.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: react#16.14.0
npm ERR! node_modules/react
npm ERR! peer react#"^16.3.0" from react-typed#1.2.0
npm ERR! node_modules/react-typed
npm ERR! react-typed#"^1.2.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /vercel/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /vercel/.npm/_logs/2022-12-02T16_42_09_037Z-debug-0.log
Error: Command "npm install" exited with 1
I have tried running npm install --legacy-peer-deps and tried redeploying onto Vercel, but the same issue persists. When I run this application on my localhost:3000 using npm run dev, the application renders fine. Anyone knows what I can do?
I have tried
npm install --legacy-peer-deps
and also pushing these changes onto my GitHub repository. When redeploying, the same issue still shows. I run
npm install --legacy-peer-deps
again, but this time, there are no more changes to be made.
you can override the installing command used by Vercel CLI, either by:
Going to Vercel Dashboard -> -> Settings -> General -> Scroll to Build & Development Settings and put npm install --legacy-peer-deps in Install Command
Creating vercel.json file in the root directory of your project that should contain:
// vercel.json
{
"installCommand": "npm install --legacy-peer-deps"
}
after that push and wait for deployment, it should go through this time
But I recommend looking for the cause of this issue. It seems like some dependency you're using is depending on react-typed, and the latter is not maintained anymore. It's better to seek an alternative

how to solve the error that occure while using npm?

I want to use react-facebook-login in my react app. when I use npm i react-facebook-login it show the error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: yourguide#0.1.0
npm ERR! Found: react#17.0.2
npm ERR! node_modules/react
npm ERR! react#"^17.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.0.0" from react-facebook-login#4.1.1
npm ERR! node_modules/react-facebook-login
npm ERR! react-facebook-login#"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Ejaz\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Ejaz\AppData\Local\npm-cache\_logs\2022-06-30T10_39_17_572Z-debug-0.log
I am unable to find the solution to solve this problem. can anyone can give me the solution to solve this problem.

ionic start with blank template giving error

I installed latest node, npm and angular
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: z#0.0.1
npm ERR! Found: #angular/compiler#11.0.9
npm ERR! node_modules/#angular/compiler
npm ERR! dev #angular/compiler#"~11.0.5" from the root project
npm ERR! peer #angular/compiler#"11.0.9" from #angular/compiler-cli#11.0.9
npm ERR! node_modules/#angular/compiler-cli
npm ERR! dev #angular/compiler-cli#"~11.0.5" from the root project
npm ERR! peer #angular/compiler-cli#"^11.0.0" from #angular-devkit/build-angular#0.1100.7
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/compiler#"11.1.2" from #angular/localize#11.1.2
npm ERR! node_modules/#angular/localize
npm ERR! peerOptional #angular/localize#"^11.0.0" from #angular-devkit/build-angular#0.1100.7
npm ERR! node_modules/#angular-devkit/build-angular
npm ERR! dev #angular-devkit/build-angular#"~0.1100.5" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\JatinKumar\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JatinKumar\AppData\Local\npm-cache\_logs\2021-02-04T19_41_41_433Z-debug.log
[ERROR] An error occurred while running subprocess npm.
npm.cmd i exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
run npm install --force
and then
npm install --save-dev --force
Now you can run your project!

Can not create ionic 2 app

I am following the ionic installation guide, but when I want to create app it give me error.
The command I enter is:
ionic start cutePuppyPics --v2
The error it gives is:
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\Program Files (x86)\\Nodist\\v\\nodev7.0.0\\node.exe" "C:\\Program Files (x86)\\Nodist\\bin\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! node v7.0.0
npm ERR! npm v3.10.6
npm ERR! code ELIFECYCLE
npm ERR! node-sass#3.9.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass#3.9.3 postinstall script 'node scripts/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the node-sass package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node scripts/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs node-sass
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls node-sass
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! E:\nodeProjects\ionic\cutePuppyPics\npm-debug.log
Error with start undefined
Error Initializing app: There was an error with the spawned command: npminstall
There was an error with the spawned command: npminstall
Caught exception:
undefined
Mind letting us know? https://github.com/driftyco/ionic-cli/issues
Node v7.0.0 causes this problem. Instead of nodejs v7.0.0 use nodejs v6.9.1 or install LTS version of node from https://nodejs.org/en/download
You don't have to use --v2 when creating your project. Just type
ionic start cutePuppyPics blank
--v2 is not working with latest ionic. you can use
ionic start cutePuppyPics ionic-angular (for ionic 2.x)
ionic start cutePuppyPics ionic1 (ionic 1.x)

Npm install directly from Github Error: ENOENT

I'm running an example from build-nodejs-npm-installation-package-scratch. Instead of uploading to npm repository I'm putting it on Github and trying to download it via npm instead. I run npm install git+https://github.com/t2wu/replaceme.git and got the following:
npm ERR! Error: ENOENT, chmod '/private/tmp/node_modules/replaceme_tim/replaceme.js'
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR! <http://github.com/npm/npm/issues>
npm ERR! System Darwin 13.2.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "git+https://github.com/t2wu/replaceme.git"
npm ERR! cwd /private/tmp
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.9
npm ERR! path /private/tmp/node_modules/replaceme_tim/replaceme.js
npm ERR! code ENOENT
npm ERR! errno 34
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /private/tmp/npm-debug.log
npm ERR! not ok code 0
I have a package.json in there, I cannot figure out what is wrong.
EDIT: I can install Express OK, but I can't install my practice module
This happens due to missing permissions or unlinked files while npm was working. This topicc is also seen at github, here.
Try running with admin perms.