Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Yarn: Never-ending build of fresh packages

Tags:

Has anyone experienced building packages that never ends? Not sure what the issue is but this happens every now and then. Happened to me twice and I am not sure how those instances got fixed. Now I want to document it just in case I or someone will encounter this again.

Here is the link of the issue: https://github.com/yarnpkg/yarn/issues/7779

like image 226
tux Avatar asked Dec 26 '19 07:12

tux


People also ask

Should I ignore yarn cache?

yarn/unplugged should likely always be ignored since they typically hold machine-specific build artifacts. Ignoring it might however prevent Zero-Installs from working (to prevent this, set enableScripts to false ). . yarn/versions is used by the version plugin to store the package release definitions.

What happens after yarn build?

after yarn build you can see the build folder inside your project, this folder contains the bundled app or compiled project.

How do you clean yarn dependencies?

Do yarn remove on each of the dependency packages in package. json ( dependencies and devDependencies entries). This should remove all dependencies including all intermediate dependencies from yarn. lock .


2 Answers

As strange as it may sound. I was having the same issue when I tried to install package using yarn through VS Code. when I hit yarn on the terminal it completed the process without taking any more time than it should.

like image 183
Alish Giri Avatar answered Nov 16 '22 04:11

Alish Giri


I experienced the same issue when running yarn install with Electron. The way to solve this was to run:

yarn cache clean && yarn install 

while you are on MOBILE NETWORK, via hotspot. For some weird reason the normal network was giving issues.

like image 27
CyberMessiah Avatar answered Nov 16 '22 02:11

CyberMessiah