yarnpkg
Yarn cache takes a lot of space
Yarn website says the following:- Yarn stores every package in a global cache in your user directory on the file system. You can use yarn cache list & it will print out every cached package. Just in case you wanted to go through. You can use yarn cache clean & it will clean the cache … Read more
Multiple versions of the same package in the yarn.lock file
To investigate how many times a depenedency is installed and what packages dependens on it (recursivly), run: yarn why <package-name>. See if you can upgrade (or downgrade) some packages to ensure that all of the dependencies in your package are using the same version of angular. For example: yarn why execa: yarn why v1.22.5 [1/4] … Read more
Does npx use yarn?
npx create-react-app executes create-react-app binary, and create-react-app uses yarn to create your project (if yarn is installed). that’s why you can see yarn.lock and also why yarn-start works. Difference between npx create-react-app and yarn create react-app They both executes create-react-app binary. create-react-app is the one who decides whether it wants to create the project with … Read more
how to convert package-lock.json to yarn.lock?
You can use yarn import to generate yarn.lock file from an existing npm-installed node_modules folder. yarn import aims to alleviate this challenge by generating a yarn.lock file in one of two ways: Using the dependency tree in an existing package-lock.json file created by npm install If no such file exists, using the versions found inside … Read more
Angular CLI with yarn
ng config -g cli.packageManager yarn
Committing .yarn directory to git when using yarn berry
The Yarn developers explain the rationale for this in the Installation docs, in the section called “About global installs”: Using a single package manager across your system has always been a problem. To be stable, installs need to be run with the same package manager version across environments, otherwise there’s a risk we introduce accidental … Read more
Yarn does not update local dependency
You can upgrade the dependencies with yarn upgrade. If it takes too much time, you can upgrade just certain packages yarn upgrade pkg in your case
Yarn – Node Sass does not yet support my current environment
I’m using OSX latest version(10.14.4 (18E226)) and node 12. While using node-sass 4.11, I had g++ error(../src/create_string.cpp:17:25: error: no matching constructor for initialization of ‘v8::String::Utf8Value’) while trying npm install, npm rebuild(link) which did not work. I solved this by updating node-sass to 4.12(npm install node-sass), as the github issue on the node-sass says that support … Read more
Is it possible to use yarn-pnp with typescript/vscode?
Yes! Typescript cli works out of the box in Yarn 2+, so you can just add the package: yarn add -D typescript and run the compilation: yarn tsc It is also possible to make VS Code work with PnP modules! You can use `@yarnpkg/sdks package (which is a part of Yarn 2+) You can enable … Read more