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 do I get `npx mrm lint-staged` working

I am aware of lint-staged not running on precommit but none of the solutions helped me. I ran npx mrm lint-staged, but the pre-commit hook is not running. I went to check .git/hooks, and no hook was created here by husky. I have tried uninstalling…
Samson
  • 1,336
  • 2
  • 13
  • 28
2
votes
1 answer

Readonly cache for Yarn in Docker

I want to create a global Yarn cache for my projects that are built on my CI servers. My projects are dockerized, and I have created a nightly job to populate this cache. Think of it as a project with a package.json containing all dependencies from…
Ali Tou
  • 2,009
  • 2
  • 18
  • 33
2
votes
1 answer

jupyter labextension install of qgrid failed on optional dependency (windows)

When I try jupyter labextension install qgrid it fails, and the core error in the log file is the following: $ webpack --config webpack.prod.minimize.config.js [webpack-cli] ModuleNotFoundError: Module not found: Error: Can't resolve…
Denise Draper
  • 1,027
  • 10
  • 24
2
votes
1 answer

Any Conflicts With Running Both NPM and Yarn Globally

I have been using NPM exclusively for my projects and was assigned another project that requires using Yarn. I need to have support for both and will frequently switch back and forth on projects. Are there any known issues with installing yarn…
Sigma VX
  • 386
  • 3
  • 13
2
votes
1 answer

sudo npm install --global fails without error message on Linux

I'm attempting to install yarn using npm, as is recommended by the yarn project itself. At first I tried running npm install --global yarn, which failed due to inadequate permissions, so I tried again with sudo npm install --global yarn. But that…
Ecko
  • 1,030
  • 9
  • 30
2
votes
1 answer

How github-actions run test on (production) build results instead of develop mode

I currently have a github action like this in a Create React App name: Percy on: [push] jobs: percy: name: Visual Testing runs-on: ubuntu-16.04 steps: - name: Checkout uses: actions/checkout@v2 - name: Cypress run …
Norfeldt
  • 8,272
  • 23
  • 96
  • 152
2
votes
2 answers

NuxtJS possible to generate JUST plain HTML?

I'm really curious if I use NuxtJS right.. I just want to generate HTML pages, so basically I dont need ANY JavaScript! But Everytime I do generate any page with Nuxt There is a lot of JS in there. Now I managed to remove ClientSide Scripts with: …
Martin
  • 208
  • 4
  • 15
2
votes
2 answers

After creating a React app with yarn dlx create-react-app, the first time I press yarn start to start it, I get an error

Use yarn 2 (yarnpkg/berry) in terminal % yarn set version berry % yarn dlx create-react-app apple % cd apple % yarn start in browser Failed to compile Failed to load config "react-app" to extend from. Referenced from:…
2
votes
2 answers

`yarn set version from sources` results in "Unrecognized or legacy configuration settings found: changesetIgnorePatterns"

Can't seem to install yarn from sources and I'm not sure how to even debug this sort of thing. Things I've tried: homebrew nodejs and yarn nodejs from official pkg From the docs I've read, changesetIgnorePatterns should be a valid configuration…
2
votes
1 answer

React tsconfig-paths not find module

I have tsconfig-paths version 3.9.0 configured in my tsconfig.json in the following way: tsconfig.json: { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, …
Matheus Carvalho
  • 415
  • 7
  • 13
2
votes
2 answers

Error: A React component suspended while rendering, but no fallback UI was specified

I'm trying to use https://github.com/adarshpastakia/ant-extensions/tree/master/modules/searchbar I've added the code on the tutorial but get an error, is the library broken? Works on their storyboard
r342346
  • 119
  • 1
  • 15
2
votes
2 answers

yarn workspaces shared package does not load in create-react-app

I am using yarn workspaces to maintain my monorepo with this structure: root |- package.json |- packages | - frontend -> create-react-app |- package.json | - shared -> custom library |- package.json | -…
Baterka
  • 3,075
  • 5
  • 31
  • 60
2
votes
1 answer

Installing electron with jitsi-meet-electron repo

I have downloaded the jitsi-meet-electron repo for building desktop app from https://github.com/jitsi/jitsi-meet-electron.git Now, when I am trying to install electron using yarn, I am getting the below error.I think the problem is with the robotjs…
2
votes
1 answer

gcloud functions deploy build with yarn.lock does not use --production flag

I am trying to deploy a NodeJS Google Cloud Function using the gcloud CLI. We use a couple private NPM modules in our devDependencies, but we don't need them in our production environment. When I try to deploy the function, I get a 401 error because…
2
votes
1 answer

`yarn add` and `npm install --save` both does not install packages to local project

I forked a React Native-derived framework project which the original author has recently stopped maintaining. The original author had made another project, which is an installer script for the framework. so I forked this too. The latter worked…
Jihoo Byeon
  • 69
  • 1
  • 8