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
2 answers

Problem with yarn when trying to set a ruby on rails application with react

Following this tutorial I am stepping into odd errors in the very first steps. After running: rails new rails-react-tutorial --webpack=react I would then try after bundle install rails webpacker:install:react rails generate react:installyarn…
Gotey
  • 449
  • 4
  • 15
  • 41
2
votes
0 answers

Yarn hot reload not hot reloading

I've found this question about yarn not hot reloading, but it doesn't answer my question. I'm using macOS Catalina, and I'm using yarn start to see the change I make on my project. It has always hot reloaded, but suddenly, it stopped working and…
user11984600
2
votes
1 answer

How do I get the current project name in command line using node?

If I am inside a project, I'd like to be able to run a command that outputs the name of that project dynamically. Is there a native yarn command? Note that macs don't have jq (which would make it easy...just read package.json` Example my-project -…
Toli
  • 5,547
  • 8
  • 36
  • 56
2
votes
1 answer

JavaScript out of memory when building with yarn

I am using yarn and trying to build my project. The issue that happens is memory heap goes out of its actual size which fails the build. FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory What…
Nika Kurashvili
  • 6,006
  • 8
  • 57
  • 123
2
votes
2 answers

Yarn global install: "adonis: command not found"

Installed Adonis with yarn on Ubuntu 18 (running on WSL2 VM): pomatti@NT-03024:~/Projects/myApp$ yarn global add @adonisjs/cli yarn global v1.19.1 [1/4] Resolving packages... [2/4] Fetching packages... info fsevents@1.2.9: The platform "linux" is…
Evandro Pomatti
  • 13,341
  • 16
  • 97
  • 165
2
votes
0 answers

Yarn add babel/preset-react fails

Using the command recommended by the docs: > yarn add @babel/preset-react --dev yarn add v1.17.3 [1/5] Validating package.json... [2/5] Resolving packages... error An unexpected error occurred: "https://registry.yarnpkg.com/@babel%2freact: Not…
xxjjnn
  • 14,591
  • 19
  • 61
  • 94
2
votes
2 answers

Yarn packages out of date when running Rails app in Docker

I start my Rails 6 app as Docker containers, but when it starts the Rails server, it keeps giving the error: warning Integrity check: System parameters don't match website_1 | error Integrity check failed website_1 | error Found 1…
John
  • 6,404
  • 14
  • 54
  • 106
2
votes
2 answers

Rails 6 app install Glide.js using Yarn (webpacker) - Uncaught ReferenceError: Glide is not defined

I'm really struggling with this all new JS changes to Rails. I'm trying to implement stupidly simple slider script, Glide.js This is my app/javascripts/packs/front.js file: // Internal // require("@rails/ujs") import Glide from…
2
votes
0 answers

Trouble installing mermaid command line interface

I'm trying to use the mermaid tool to build diagrams. I installed on windows using, yarn add mermaid after first downloading scoop and yarn. And then, to get the command line interface I used, yarn add mermaid.cli ./node_modules/.bin/mmdc…
2
votes
2 answers

Yarn failing to start service based on "path/" argument must be of type string, Vue application, windows10

I am using a template, Vue cli3 application and it stopped working and I don't recall why. The error I am receiving is when I try to start the application I get this error. yarn run serve yarn run v1.16.0 error An unexpected error occurred: "The…
illcrx
  • 774
  • 1
  • 12
  • 32
2
votes
0 answers

Yarn Node project fsevents linux incompatibiltiy

I am getting an error (well, actually an info) when using yarn to build a Node project having Webpack as a devDependency in the package.json. I use Ubuntu 19.04: info fsevents@1.2.9: The platform "linux" is incompatible with this module. info…
Socrates
  • 8,724
  • 25
  • 66
  • 113
2
votes
1 answer

List all dependents of a dependency from lock file

Is it possible to list all dependents of specific dependency from a lock file (npm/pnpm/yarn)? It's the opposite of yarn ls I prefer not to read the lock file if there is a built-in command in npm/pnpm/yarn I know that I can ask npm registery for…
Stav Alfi
  • 13,139
  • 23
  • 99
  • 171
2
votes
1 answer

How can I verify Yarn's integrity checks actually work?

I cannot figure out how to determine if Yarn's integrity checks actually do anything. There is not a lot of documentation. I've tried modifying integrity hashes to be bogus ones in yarn.lock and then trying to yarn install or run yarn check…
Wil Gieseler
  • 1,893
  • 1
  • 17
  • 18
2
votes
3 answers

Interface 'NodeModule' cannot simultaneously extend types 'Module' and 'Module'

I'm use React. After create-react-app --typescript I've added few libraries to package.json after that I received exception in runtime. TypeScript error in D:/catalog/node_modules/@types/node/globals.d.ts(223,11): Interface 'NodeModule' cannot…
2
votes
0 answers

nested package.json in Yarn workspaces

When using yarn workspaces is it possible to have nested package.json files to resolve dependancies for a subset of packages? Avoiding repetition? where cra are create-react-apps and pkg are packages that these sites consume. e.g. | / | -…
AndrewMcLagan
  • 13,459
  • 23
  • 91
  • 158
1 2 3
99
100