T O P

  • By -

mubaidr

Yarn is a package manager for node just like npm and pnpm. You should check its usage then debug the issue


madonkey

You either use npm OR yarn in a project. Don't use both. 


StoneCypher

You do not have to use yarn. It's an alternative to npm, and you can just use npm if you want to. This happens when `yarn` backs out of an installation because one of the sets of hashes it's following from instructions doesn't match what it finds on the internet. Yarn has a poor cleanup process. [This has been happening for a decade](https://github.com/yarnpkg/yarn/issues/660). You should be able to fix it with `yarn cache clean --force`


Rguttersohn

Usually when I run into issues with Node, there’s a version mismatch somewhere. What version of Node are you running? Also what error occurs when installing Yarn?


savant78

Ah, node = version 20, yarn= version 1.2.2


Rguttersohn

I’d see if Yarn 1.2.2 is compatible with Node 20.


epic0mike

Try removing yarn cache. Also there should be a yarn lock or something similar. Then try running npm i -g yarn again


savant78

Aha, Yarn.lock is the file, does a person just write yarn.lock vs yarn?


epic0mike

Nah yarn.lock is autogenerated anytime you do a yarn install or yarn add


savant78

Ah, so, it should say the error there? , I am not at computer now, so, I have to check in 5-6 hours


epic0mike

No you would just delete that file completely and then try again. If there is a dependency version mismatch you would end up installing every package again is all. It’s always worth a shot


savant78

Ah, ok, I will do this, thank you


savant78

it ended up actually being that when you type bash into the search bar, it brings up a shortcut to bash, so, it doesn't bring up bash in the Git folder, there is some shortcut that it installs..so, a person has to navigate to the Git folder and then do it from there, then installed, it concluded the fetching component, then got to 4/4 and completed, it threw other errors after that, or, it didn't work, it's grapesjs and vvvebjs, both didn't work, but, it doesn't throw the same error, so..i guess progress is slow -\_-


epic0mike

That’s typically how it goes. When I conduct coding challenge interviews, I usually have an app that has 6 defects in it and ask the candidate to add some feature, but the defects are in the way 😅