Installing expo-cli: Could not resolve dependency: - node.js

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: type-fest#0.5.2
npm ERR! node_modules/expo-cli/node_modules/type-fest
npm ERR! type-fest#"^0.5.2" from boxen#4.1.0
npm ERR! node_modules/expo-cli/node_modules/boxen
npm ERR! boxen#"4.1.0" from expo-cli#4.4.7
npm ERR! node_modules/expo-cli
npm ERR! expo-cli#"*" from the root project
npm ERR! boxen#"4.1.0" from xdl#59.0.37
npm ERR! node_modules/expo-cli/node_modules/xdl
npm ERR! xdl#"59.0.37" from expo-cli#4.4.7
npm ERR! node_modules/expo-cli
npm ERR! expo-cli#"*" from the root project
npm ERR! 1 more (#expo/dev-tools)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional type-fest#"^0.13.1" from #pmmmwh/react-refresh-webpack-plugin#0.3.3
npm ERR! node_modules/expo-cli/node_modules/#pmmmwh/react-refresh-webpack-plugin
npm ERR! #pmmmwh/react-refresh-webpack-plugin#"^0.3.3" from #expo/webpack-config#0.12.71
npm ERR! node_modules/expo-cli/node_modules/#expo/webpack-config
npm ERR! #expo/webpack-config#"0.12.71" from xdl#59.0.37
npm ERR! node_modules/expo-cli/node_modules/xdl
npm ERR! xdl#"59.0.37" from expo-cli#4.4.7
npm ERR! node_modules/expo-cli
npm ERR! 1 more (#expo/dev-tools)
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.
I tried using --force but it didn't work. I also tried using --legacy-peer-deps and that made it install but when I type expo init myapp it says:
bash: expo: command not found
What is the problem over here?

I had the same issue, but this command worked for me:
npm install --global expo-cli --legacy-peer-deps

Related

I tried ng add #angular/pwa, but it failed with this error code that I cannot understand. Is there anything I can do to solve this?

npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: my-app#0.0.0
npm ERR! Found: #angular/common#14.2.0
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^14.2.3" from the root project
npm ERR! peer #angular/common#"14.2.0" from #angular/forms#14.2.0
npm ERR! node_modules/#angular/forms
npm ERR! #angular/forms#"^14.2.3" from the root project
npm ERR! 4 more (#angular/platform-browser, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! #angular/common#"^14.2.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/core#14.2.3
npm ERR! node_modules/#angular/core
npm ERR! peer #angular/core#"14.2.3" from #angular/common#14.2.3
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^14.2.3" 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.
Ok I found the answer through angular communities, you just need to run this command on the terminal
ng update #angular/cli #angular/core

Cannot install under npm packages anymore

When I want to install something under npm then I get an error. I try to fix it so many ways but failed. Here is the error
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: undefined#undefined
npm ERR! Found: #nomiclabs/hardhat-ethers#0.3.0-beta.13
npm ERR! node_modules/#nomiclabs/hardhat-ethers
npm ERR! dev #nomiclabs/hardhat-ethers#"npm:hardhat-deploy-ethers" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev #nomiclabs/hardhat-waffle#"^2.0.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #nomiclabs/hardhat-ethers#2.1.1
npm ERR! node_modules/#nomiclabs/hardhat-ethers
npm ERR! peer #nomiclabs/hardhat-ethers#"^2.0.0" from #nomiclabs/hardhat-waffle#2.0.3
npm ERR! node_modules/#nomiclabs/hardhat-waffle
npm ERR! dev #nomiclabs/hardhat-waffle#"^2.0.3" 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\Mazhar\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\Mazhar\AppData\Local\npm-cache\_logs\2022-09-11T23_40_30_606Z-debug-0.log
PS C:\Users\Mazhar\Documents\Alchemy-weekly\nft-marketplace-scratch>

Installing nest/terminus gives dependency tree error

Whenever I try to install nest/terminus
npm i #nestjs/terminus
I get the following error
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: typeorm#0.3.7
npm ERR! Found: ioredis#4.28.5
npm ERR! node_modules/ioredis
npm ERR! peer ioredis#"^4.0.0" from #nestjs-modules/ioredis#1.0.1
npm ERR! node_modules/#nestjs-modules/ioredis
npm ERR! #nestjs-modules/ioredis#"^1.0.1" from the root project
npm ERR! ioredis#"^4.28.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peerOptional ioredis#"^5.0.4" from typeorm#0.3.7
npm ERR! node_modules/typeorm
npm ERR! peertypeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.1.4" from the root project
npm ERR! typeorm#"^0.3.7" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: ioredis#5.2.1
npm ERR! node_modules/ioredis
npm ERR! peerOptional ioredis#"^5.0.4" from typeorm#0.3.7
npm ERR! node_modules/typeorm
npm ERR! peer typeorm#"^0.3.0" from #nestjs/typeorm#8.1.4
npm ERR! node_modules/#nestjs/typeorm
npm ERR! #nestjs/typeorm#"^8.1.4" from the root project
npm ERR! typeorm#"^0.3.7" 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.
I tried running the following command
npm install --save --legacy-peer-deps
it ran okay, but on repeating the terminus installation I got the same error. Any idea what I might be doing wrong?

when i am going any dependency install i am getting an error like this

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: chat_application#0.1.0
npm ERR! Found: react#18.1.0
npm ERR! node_modules/react
npm ERR! react#"^18.1.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react#"^16.8.0 || ^17.0.1" from react-chat-engine#1.11.22
npm ERR! node_modules/react-chat-engine
npm ERR! react-chat-engine#"*" from the root project
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\Swapnil\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\Swapnil\AppData\Local\npm-cache\_logs\2022-04-28T04_06_41_338Z-debug-0.log
Try using - npm install --save modulename --legacy-peer-deps

Error when trying to npm install -g #aws-amplify/cli

new to this, I'm trying to install aws amplify from the command line and it keeps throwing me an err messages: I tried sudo, tried the safe route to no avail. I'm new to node and understanding dependencies etc. and not sure what I've done wrong!
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: graphql#14.7.0
npm ERR! node_modules/#aws-amplify/cli/node_modules/graphql
npm ERR! graphql#"^14.5.8" from #aws-amplify/amplify-category-api#1.1.10
npm ERR! node_modules/#aws-amplify/cli/node_modules/#aws-amplify/amplify-category-api
npm ERR! #aws-amplify/amplify-category-api#"1.1.10" from #aws-amplify/cli#7.6.8
npm ERR! node_modules/#aws-amplify/cli
npm ERR! #aws-amplify/cli#"*" from the root project
npm ERR! #aws-amplify/amplify-category-api#"1.1.10" from amplify-container-hosting#2.4.10
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-container-hosting
npm ERR! amplify-container-hosting#"2.4.10" from #aws-amplify/cli#7.6.8
npm ERR! node_modules/#aws-amplify/cli
npm ERR! #aws-amplify/cli#"*" from the root project
npm ERR! graphql#"^14.5.8" from #aws-amplify/graphql-auth-transformer#0.5.7
npm ERR! node_modules/#aws-amplify/cli/node_modules/#aws-amplify/graphql-auth-transformer
npm ERR! #aws-amplify/graphql-auth-transformer#"0.5.7" from #aws-amplify/cli#7.6.8
npm ERR! node_modules/#aws-amplify/cli
npm ERR! #aws-amplify/cli#"*" from the root project
npm ERR! #aws-amplify/graphql-auth-transformer#"0.5.7" from amplify-provider-awscloudformation#5.8.7
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-provider-awscloudformation
npm ERR! amplify-provider-awscloudformation#"5.8.7" from #aws-amplify/cli#7.6.8
npm ERR! node_modules/#aws-amplify/cli
npm ERR! #aws-amplify/cli#"*" from the root project
npm ERR! 2 more (#aws-amplify/amplify-category-api, amplify-util-mock)
npm ERR! 1 more (#aws-amplify/graphql-relational-transformer)
npm ERR! 88 more (amplify-app, amplify-codegen, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer graphql#"^15.0.0" from relay-compiler#12.0.0
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-codegen-appsync-model-plugin/node_modules/#graphql-codegen/visitor-plugin-common/node_modules/relay-compiler
npm ERR! relay-compiler#"12.0.0" from #graphql-tools/relay-operation-optimizer#6.4.1
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-codegen-appsync-model-plugin/node_modules/#graphql-codegen/visitor-plugin-common/node_modules/#graphql-tools/relay-operation-optimizer
npm ERR! #graphql-tools/relay-operation-optimizer#"^6.3.7" from #graphql-codegen/visitor-plugin-common#2.5.2
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-codegen-appsync-model-plugin/node_modules/#graphql-codegen/visitor-plugin-common
npm ERR! #graphql-codegen/visitor-plugin-common#"^2.5.1" from amplify-codegen-appsync-model-plugin#1.24.4
npm ERR! node_modules/#aws-amplify/cli/node_modules/amplify-codegen-appsync-model-plugin
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.
run npm install -g npm#latest
and after that try installing amplify-cli again.

Resources