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

Pulling dependencies using YARN from private registry artifactory

The team I am working on we are developing React applications and we are using yarn for pulling dependencies. We are using a private registry from where we are pulling npm dependencies and we are also using a private artifactory via jFrog to pull…
Ectoras
  • 1,297
  • 3
  • 13
  • 33
2
votes
1 answer

Install different packages depending on node version

I have a project that depends on the websocket package. However, for node 10.x, the latest version (1.0.31) of websocket works, while on node 4.x version 10.0.24 works but the 10.0.31 does not. Is it possible to specify different package (versions)…
vidstige
  • 12,492
  • 9
  • 66
  • 110
2
votes
1 answer

Uncaught SyntaxError: Unexpected token '<' | after "yarn add xlsx" | React Typescript

I'm developing project in React (type script). I wanted to add new feature for export/import excel files and I decided to use xlsx library https://www.npmjs.com/package/xlsx So my issue is that I ran "yarn add xlsx" and my app is giving me error…
user3019725
2
votes
2 answers

Yarn or npm? for installing dependencies in react-native

what should I use to install react-native dependencies? yarn or npm, in my case npm have some problems with some of dependencies. Sometimes i use npm to install these, but i am still confused to decide which one to use permanently.
Haseeb Javed
  • 63
  • 2
  • 13
2
votes
1 answer

Is it possible to tell Yarn not to create a yarn.lock file?

With npm you can create a .npmrc file with "package-lock=false" Is there something similar with Yarn?
Moshe Kerbel
  • 121
  • 7
2
votes
0 answers

@babel/runtime vs babel-runtime

I'm trying to get all my JS/TS project dependencies up to date, and I see that @babel/runtime is the new way, while babel-runtime was the old way. I put @babel/runtime into my package.json (I end up with 7.8.4), but I still end up with…
GaryO
  • 5,873
  • 1
  • 36
  • 61
2
votes
2 answers

Cannot find name 'Buffer' error after installing Tesseract.js in Angular

I need Tesseract in my project so first I used yarn add tesseract.js after that I used yarn add --dev @types/tesseract.js. When I try to use ng serve I get the following error: ERROR in node_modules/tesseract.js/src/index.d.ts:98:60 - error TS2591:…
Gavin Hartog
  • 31
  • 1
  • 5
2
votes
0 answers

yarn build cases error command failed exir code 64

I am trying to build my project so i use yarn build but every time i use this i get an error : $ sh scripts/copy-build.sh mkdir: ../../target/classes: No such file or directory ✅ Copying resources from ../build to…
Meyben
  • 451
  • 3
  • 15
2
votes
0 answers

Yarn 2.0: unable to get local issuer certificate

Attempting to migrate to yarn 2.0 and run into a problem with private npm packages resulting in YN0001: │ GotError: unable to get local issuer certificate Got around this in yarn 1.x with the strict-ssl: false config setting. Is there a way of…
rooooney
  • 21
  • 1
  • 2
2
votes
0 answers

Yarn link works for one file but throws error for another file in same Angular project

I'm trying to build an Angular project where I have 3 files - getComputers.js, getIps.js and one typescript file - app.ts. I need to require a trendmicro module in both Javascript files. For one file it works but for the other it throws a module not…
hd3adcode
  • 354
  • 5
  • 12
2
votes
1 answer

Yarn can't find rollup?

I'm trying to build lumo (a Clojurescript REPL) from source in a Debian chroot, and running into an error: Building production bundle... Circular dependency: src/js/cljs.js -> src/js/repl.js -> src/js/cljs.js Circular dependency: src/js/cli.js ->…
Jason Pepas
  • 424
  • 5
  • 12
2
votes
0 answers

yarn command exit code 0 - electron

Some of my friends are sharing some demo projects, so that I can learn electron, I know react already, I think. So before editing source, I'm trying to build and see how it is. In package json there are some instruction : "scripts": { …
Maifee Ul Asad
  • 3,992
  • 6
  • 38
  • 86
2
votes
1 answer

Storybook 5.3 issue with yarn version 2

For a project requirement, I am configuring storybook 5.3 for react component development. I am using Yarn version 2 as the package manager.I've done all the steps mentioned in the storybook tutorial. but when starting the storybook using 'yarn…
vimal
  • 23
  • 5
2
votes
3 answers

npm warnings when installing laravel bootstrap

I was trying to use the preset bootstrap function and run npm install as required but i got this error message: C:\Users\morte\Documents\NoStatic>php artisan preset bootstrap Bootstrap scaffolding installed successfully. Please run "npm install &&…
Kh4zy
  • 105
  • 1
  • 3
  • 11
2
votes
1 answer

sh: react-scripts: command not found

I'm taking a course on Udemy where we are going to use create-react-app. But when I come to run npm start and/or yarn start, I get an error. This is the course: Complete React Developer in 2020 (w: Redux, Hooks, GraphQL) npx create-react-app…
Mats Hagen
  • 23
  • 1
  • 5