nedpals / myuic-neo

An unofficial, third-party student portal website for students of the University of the Immaculate Conception (UIC).
https://myuic.nedpals.xyz
GNU Affero General Public License v3.0
17 stars 7 forks source link

dependency error #10

Closed aaalgieee closed 1 year ago

aaalgieee commented 1 year ago
Screen Shot 2023-08-18 at 12 31 20 AM
aidrecabrera commented 1 year ago

Hi @aaalgieee,

Maayong buntag! :D

The package manager @nedpals used is Yarn.

I have reproduced your issue by using npm, and I got the same issue when I run npm install

image

Solution 1

Simply use Yarn as the package manager.

I can see why using Yarn doesn't cause any issues since I found that it handles these peer dependency conflicts differently and reliably well. In this case,

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: myuic-neo@1.0.2
npm ERR! Found: @awesome-cordova-plugins/core@5.46.0
npm ERR! node_modules/@awesome-cordova-plugins/core
npm ERR!   @awesome-cordova-plugins/core@"^5.44.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @awesome-cordova-plugins/core@"^6.0.1" from @awesome-cordova-plugins/printer@6.4.0
npm ERR! node_modules/@awesome-cordova-plugins/printer
npm ERR!   @awesome-cordova-plugins/printer@"^6.4.0" from the root project

Use yarn install instead of npm install

npm install --global yarn then you can run yarn install and you're good to go 👍🏻

image image image image

Solution 2

If you still want to use npm as the package manager, you can add a --legacy-peer-deps flag when running npm install --legacy-peer-deps

legacy-peer-deps

image image

Both worked for me. Let me know if this helped you. Thanks!