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
1 answer

Installing 'react-bootstrap' on a Gatsby Starter deployed on Netlify

I'm very new to both gatsby and react. I'm making a Contact form and wanted to do it based on a tutorial that used components from react-bootstrap, however I don't know how to install it on my the gatsby starter I've deployed through my github…
user13
  • 39
  • 7
2
votes
0 answers

yarn add react-native whern creating a project via npx

So I have npm 7.5.3 and node v15.8.0 on my ubuntu system. I'm trying to create a react-native project as follows: npx react-native init Sample And I get a large error dump with the following description towards the end Installing…
Vocaloidas
  • 360
  • 2
  • 17
2
votes
2 answers

Volta with yarn run build system cannot find the path specified

This is the first time I'm using Volta, so bear with me. I have installed globally typescript, node and yarn yarn -v >> 1.22.10 node -v >> v14.15.4 npm -v >> 6.14.10 These commands work inside and outside my project folder, with the same…
David Diez
  • 1,165
  • 1
  • 11
  • 23
2
votes
1 answer

Unable to precompile-assets

I'm trying to precompile assets, but am getting a rather ambiguous error. I thought that it might be an issue with node-sass, which then led me to trying to install via Yarn, but that also failed with a less than useful error. Any help would be…
WhoaItsAFactorial
  • 3,538
  • 4
  • 28
  • 45
2
votes
2 answers

Cannot start reactJS server | error: "rbenv: yarn: command not found"

I have recently installed rbenv for some ruby projects but now cannot run my reactjs server for a different project. The error message from running yarn start is rbenv: yarn: command not found According to this link the error may have something to…
avoshmo
  • 55
  • 5
2
votes
1 answer

Yarn can't run any script

When I run yarn start or any other following scripts: "scripts": { "start": "webpack-dev-server --config scripts/webpack.dev.js", "clean": "rimraf build", "build": "yarn run clean && yarn run compile", "compile":…
Ozgur
  • 3,738
  • 17
  • 34
2
votes
1 answer

Why is yarn throwing an error after installing babel-loader?

After I installed the react-icons package, my code threw an error saying my babel-loader was missing, so I installed that package too. Next thing I knew, I ran yarn start and this error came up: Assertion failed: (napi_create_string_utf8(env,…
2
votes
0 answers

How can I debug typescript in Yarn2 workspace using vscode?

I have yarn2 (berry) project with workspaces and I'm using ts-node to run each workspace (package). How do I set up the vscode launch.json to be be able to debug a workspace? For clarification, I have a global tsconfig with general configuration and…
2
votes
1 answer

Android SDK location not found with environment variable set

I am developing a react native app using yarn and whenever I try to run my app on an android device, I get the following error: SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in…
Rafael Barone
  • 61
  • 1
  • 2
2
votes
1 answer

yarn link not picking up local dependency version change

I'm working on an app that relies on a dependency we also manage. I use yarn link to tell my app to use the local dependency and all this worked well with my recent changes. (I did not increment the version number of the dependency). Then another…
chris loughnane
  • 2,648
  • 4
  • 33
  • 54
2
votes
1 answer

How to get a list of all eslint rules that errored during linting?

I'm currently in the process of updating the eslint packages being used for a large codebase. After the update eslint is now finding errors on thousands of files that fail different rules. Is there a way to run eslint and have it output a list of…
Carlton
  • 531
  • 1
  • 5
  • 19
2
votes
2 answers

Yarn Install packages over proxy - trouble with your network

I'm having a issue with proxy on my work, I've already added proxy config and can run yarn commands such serve. Now this is a new problem I'm facing, I can't npm install or even yarn install, what should I do to install? Edit: --network-timeout…
Lucas Marra
  • 169
  • 1
  • 16
2
votes
0 answers

Bundling javascript/npm libraries with dependencies

Problem will get demostrated on my current use-case, bundling cytoscape.js with dependencies (layouts and their respective dependencies), but answers should not be limited to this use-case. Also the answer might use other dependency management tool…
Marek Sebera
  • 39,650
  • 37
  • 158
  • 244
2
votes
0 answers

Next JS Build error occurred after compiled successfully

I have created one webpack config for NextJS in next.config.js. I'm getting some build error after the compilation regarding the export path. Anyone please help me out to fix this issue. This is my next.config.js If any changes required help to…
Vicky
  • 31
  • 6
2
votes
0 answers

Failed to read descriptor from node connection in Protractor with Typescript

When I'm trying to fetch the values from the database, I have received the below error. But the DB connection was a success. ERROR:device_event_log_impl.cc(211)] [08:19:41.497] USB: usb_device_handle_win.cc:1020 Failed to read descriptor from node…