yarn react native project with npm - node.js

I have an existing project that installs already with yarn and I was trying to install npm but I faced this errors
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: NamalWoocommerce#0.0.1
npm ERR! Found: react-native#0.63.3
npm ERR! node_modules/react-native
npm ERR! react-native#"0.63.3" from the root project
npm ERR! peer react-native#"*" from react-native-render-html#4.2.5
npm ERR! node_modules/react-native-render-html
npm ERR! react-native-render-html#"^4.2.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer react-native#">=0.60 <0.62" from react-native-webview#8.2.1
npm ERR! node_modules/react-native-webview
npm ERR! react-native-webview#"^8.0.4" from the root project
npm ERR! peer react-native-webview#"*" from react-native-render-html#4.2.5
npm ERR! node_modules/react-native-render-html
npm ERR! react-native-render-html#"^4.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 C:\Users\Ahmed Al-sudairy\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\Ahmed Al-sudairy\AppData\Local\npm-cache\_logs\2022-09-17T07_45_05_943Z-debug-0.log
I deleted yarn.lock but I faced same issue

Related

Stylint error on installing node_modules. Even while running npm start this error keep arrising

Whenever I try to install modules for the project it pops up an error for stylelint.
There is no error in code and even after removing stylelint I am unable to solve this issue
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: stylelint-custom-processor-loader#0.2.1
npm ERR! Found: stylelint#14.11.0
npm ERR! node_modules/stylelint
npm ERR! peer stylelint#"^14.10.0" from stylelint-config-recommended#9.0.0
npm ERR! node_modules/stylelint-config-recommended
npm ERR! dev stylelint-config-recommended#"9.0.0" from the root project
npm ERR! peer stylelint#"^13.0.0 || ^14.0.0" from vite-plugin-stylelint#3.0.7
npm ERR! node_modules/vite-plugin-stylelint
npm ERR! dev vite-plugin-stylelint#"^3.0.7" from the root project
npm ERR! 1 more (the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer stylelint#"^8.0.0" from stylelint-custom-processor-loader#0.2.1
npm ERR! node_modules/stylelint-custom-processor-loader
npm ERR! dev stylelint-custom-processor-loader#"^0.2.1" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: stylelint#8.4.0
npm ERR! node_modules/stylelint
npm ERR! peer stylelint#"^8.0.0" from stylelint-custom-processor-loader#0.2.1
npm ERR! node_modules/stylelint-custom-processor-loader
npm ERR! dev stylelint-custom-processor-loader#"^0.2.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\nitin\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\nitin\AppData\Local\npm-cache\_logs\2022-11-13T11_31_25_207Z-debug-0.log

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>

I am trying to upgrade angular 12 to 14 but I am getting this issue in GitLab pipeline ng-toolkit/universal

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: #ng-toolkit/universal#8.0.3
npm ERR! Found: #angular/common#14.1.0
npm ERR! node_modules/#angular/common
npm ERR! #angular/common#"^14.1.0" from the root project
npm ERR! peer #angular/common#"^14.0.0 || ^15.0.0" from #angular/cdk#14.1.0
npm ERR! node_modules/#angular/cdk
npm ERR! #angular/cdk#"^14.1.0" from the root project
npm ERR! peer #angular/cdk#"14.1.0" from #angular/material#14.1.0
npm ERR! node_modules/#angular/material
npm ERR! #angular/material#"^14.1.0" from the root project
npm ERR! 13 more (#angular/forms, #angular/material, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer #angular/common#"^8.2.6" from #ng-toolkit/universal#8.0.3
npm ERR! node_modules/#ng-toolkit/universal
npm ERR! #ng-toolkit/universal#"^8.0.3" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: #angular/common#8.2.14
npm ERR! node_modules/#angular/common
npm ERR! peer #angular/common#"^8.2.6" from #ng-toolkit/universal#8.0.3
npm ERR! node_modules/#ng-toolkit/universal
npm ERR! #ng-toolkit/universal#"^8.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 /root/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-09-11T07_44_47_296Z-debug-0.l
I am getting this error in pipeline, but local build working fine.
Node v16 and Angular 14.
This package #ng-toolkit/universal is far behind the current version of angular.
You should use #nguniversal instead: https://angular.io/guide/universal

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?

Resources