Questions tagged [yarnpkg]

This tag is for Yarn v 1.x. See version-specific tags, as version differences are significant. Yarn is an open-source JavaScript package manager. With Yarn, engineers have access to the npm registry and can install packages quickly, and manage dependencies consistently across machines or in secure offline environments.

Yarn is a fast, reliable and secure package manager for Node.js and JavaScript projects, which is compatible with the npm package registry. It aims to avoid the issues caused by npm, such as non-deterministic installations, complex dependency trees, and unreliable package combinations.

Yarn takes inspiration from Cargo, the Rust package manager, and Bundler, a Ruby tool.

The majority of packages created with npm (version 3) should be compatible with Yarn and the node_modules directory produced should satisfy all dependencies.

When should I use ?

Use when your question directly relates to Yarn. Questions about package installation issues, or Yarn's performance are in the scope of this tag and are welcome under .

Don't tag questions just because you use Yarn in your project when it's clearly not relevant to the core of your question. For example, "Why doesn't this if statement work?" is off-topic for this tag even if you used Yarn to set it up. Consider or instead for these questions.

Useful References

Comparison of npm and Yarn commands

  • yarn add = npm install --save
  • yarn global add = npm install --global
  • yarn ls = npm ls
4134 questions
2
votes
0 answers

How to install dependencies of specific Workspace using Lerna

I'm using Lerna with a monorepo typescript app, that has this structure: app/ backend/package.json frontend/package.json common/package.json ./package.json I'm also using yarn to install dependencies. My lerna.json is like: { "packages": [ …
2
votes
2 answers

Is there any way to use NPM and not Yarn while creating a project with create-react-app

I have both Yarn and NPM installed but whenever I try to create-react-app it automatically uses Yarn. I tried to run create-react-app app --use-npm but then it created it using an older version of node and NPM. I then tried updating the node and NPM…
2
votes
0 answers

Yarn picking wrong version of Node

I have node version 12.16.3 which is working fine when npm install is done but with yarn I get below issue @testing-library/jest-dom@4.2.4: The engine "node" is incompatible with this module. Expected version ">=8". Got…
Rohit Mittal
  • 395
  • 1
  • 5
  • 18
2
votes
1 answer

Deploy to Heroku failed. move-file incompatible with node version

I am struggling to deploy a new rails 6 app to heroku. It runs fine on my local. During the deployment process I receive the following output. Unfortunately, I am new to webpack and yarn. It seems like a version / dependency issue with move-file…
Boenne
  • 605
  • 4
  • 17
2
votes
0 answers

React JS can't run using npm start or yarn start

I tried to run my react project with yarn start but it always shows the error like this events.js:298 throw er; // Unhandled 'error' event ^ Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) …
2
votes
2 answers

Yarn workspaces -- package alias

TL;DR How can I create an alias for a local yarn workspace dependency? I've tried yarn workspaces before and never succeeded, and I'm giving it another try. I've set "workspaces": ["packages/*"] in package.json. For each package, I decided to use…
David Callanan
  • 5,601
  • 7
  • 63
  • 105
2
votes
1 answer

yarn warning " > bootstrap@4.x.x" has unmet peer dependency "jquery@1.9.1 - 3"

When we run yarn in a project with no node_modules directory, we get the following warning message during the dependency installs: warning " > bootstrap@4.4.1" has unmet peer dependency "jquery@1.9.1 - 3". warning " > bootstrap@4.4.1" has unmet peer…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
2
votes
1 answer

Angular upgrade from 8 to 9 - yarn incompatible error

I've upgraded the project from 8 to 9 as per angular.io upgrade guide But after the upgrade yarn install is giving this error. Does anyone know how to solve this? Error: error @angular-devkit/build-angular@0.901.4: The engine "yarn" is incompatible…
Jam
  • 39
  • 1
  • 7
2
votes
3 answers

Issue reinstalling yarn - code: 'MODULE_NOT_FOUND'

Node.js Version:14.0.0 OS: MacOS 10.15.4 Scope (install, code, runtime, meta, other?): Yarn install Module (and version) (if relevant): internal/modules/cjs/loader.js Upon running any Yarn command, I get the following error. This is after…
JLagos
  • 19
  • 1
  • 2
2
votes
1 answer

I have updated yarn with brew and I am no longer able to run the yarn command

I have updated yarn with brew and I am no longer able to run the yarn command. I have tried uninstalling and reinstalling from brew and npm and clearing all caches but have had no success. The current installed version is…
James Parsons
  • 895
  • 5
  • 18
  • 36
2
votes
1 answer

npm, pnpm, yarn or pkglink for saving time and disk space?

I'm really frustrated by the size of node_modules folder that gets created every time for every project. So, I've been looking for some time-space saving solutions. And I found PNPM ( https://pnpm.js.org/ ) , Yarn ( https://yarnpkg.com/ ) and…
xuka
  • 99
  • 1
  • 7
2
votes
2 answers

"serve -s build" returns "serve: command not found"

I cloned a react project, which was probably developed under pure Windows, into WSL of my windows. It seems that, to launch a react app properly in IE and Edge, we need to build the project and serve it. So I did yarn add react-scripts, yarn install…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
2
votes
3 answers

/bin/sh: SET: command not found

I cloned a react project that contains the following package.json. After yarn, yarn start gave me the following error. I tried yarn add react-scripts start, but it still did not work. I am using MacOS. Could anyone help? $ yarn start yarn run…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
2
votes
0 answers

During JIRA build issue with frontend-maven-plugin and Yarn

Im trying to build JIRA from source, following steps given in https://developer.atlassian.com/server/jira/platform/building-jira-from-source/ OS: Windows 10 JIRA version: 7.6.2 Im getting following error during build process (build.bat) [ERROR]…
Gnanz
  • 1,833
  • 5
  • 24
  • 51
2
votes
0 answers

NPM/Yarn equivalent for Python's "pip download && pip install --no-index --find-links"

Let's say I want to download tarballs of a package (or list of packages) with all of it's dependencies (and their sub-dependencies), and then install all of the packages from the downloaded tarballs. The installation should install the packages…
Ron Amihai
  • 21
  • 3