Questions tagged [yarnpkg-v2]

Use this tag for version specific questions about Yarn version 2.x. Yarn is an open-source JavaScript package manager created by Facebook, Exponent, Google, and Tilde. When using this tag also include the more generic [yarnpkg] tag where possible.

192 questions
0
votes
0 answers

Difference of yarn classic and yarn 3(node_modules) dependency management methods

I'm using yarn 3 workspace with nodelinker: node_modules option. As far as I know, using nodelinker: node_modules manages the library in the same way as yarn classic. what is the difference between yarn 3 and yarn classic? I'm wondering if there's…
0
votes
1 answer

yarn 3 install provides empty node_modules + npx scripts failures

I'm migrating my node repositories to yarn berry (v3) from yarn 1. So had a basic old school package.json and yarn.lock. And only a .yarnrc file to host npmjs token at user home folder. Nothing complicated. Everything works well with all deps and…
MathKimRobin
  • 1,268
  • 3
  • 21
  • 52
0
votes
2 answers

yarn: export as normal ES6 module

Take a trivial example like this: const myFunc = () => console.log("foo"); export const funcs = {myFunc}; I want to be able to import this with the browser's import() function and be able to access mod.funcs. If I import that source code directly…
Sam Bull
  • 2,559
  • 1
  • 15
  • 17
0
votes
0 answers

yarn install lint and test fails randomly on jenkins ci build

Team, I am learning yarn and it is very wierd i get no logs to see what the issue is. my build randomly fail and when i retry they work well. also every time i retry it is fresh jenkins pod agent that runs the pipeline so there is no cache issue i…
AhmFM
  • 1,552
  • 3
  • 23
  • 53
0
votes
0 answers

Using Angular with Yarn PNP, how to include assets since there is no node_modules anymore?

In the latest angular-cli (16.0.2), it defaults to using yarn and pnp. With Yarn PNP the node_modules are done, and the packages remain in their zipped form. This is great, but I am wondering how I might be able to include some assets into my…
jr.
  • 4,503
  • 7
  • 44
  • 62
0
votes
1 answer

Why is yarn create react-app ./ not working

PS C:\Users\Lewis Wachira\OneDrive\Desktop\Snack Shark Restaurant> cd clientPS C:\Users\Lewis Wachira\OneDrive\Desktop\Snack Shark Restaurant\client> yarn create react-app ./yarn create v1.22.19[1/4] Resolving packages...[2/4] Fetching…
0
votes
0 answers

Is there any way to speed up the yarn linking step in a docker multi-arch build?

So I am building a repository, leveraging Yarn 2 with offline dependencies and the node-modules linker. Linking on amd64 takes about 1.5 minutes, which is ok, but on arm64 it takes almost 20 minutes. I understand that ARM is only emulated and…
MauriceNino
  • 6,214
  • 1
  • 23
  • 60
0
votes
1 answer

Yarn 2 run bin script from dependency with pnp

I have a custom dependency that has a bin script registered in the package.json: //bin part of package json "bin": { "test123": "./scripts/testtest.js" } This script simply makes a console.log. In my libary I can execute the script with yarn…
Materno
  • 343
  • 8
  • 20
0
votes
1 answer

GitHub ci-test throwing "Your lockfile needs to be updated" even after I committed an updated Yarn lockfile

I was trying to merge my pull request to a repository. I got this error: error Your lockfile needs to be updated, but yarn was run with --frozen-lockfile. I figured this was due to my changes including new packages, so the lockfile has to be…
Nathan Tew
  • 432
  • 1
  • 5
  • 21
0
votes
0 answers

Expo: "Can't find variable: BigInt" and "Invariant Violation: "main" has not been registered" after deleting yarn.lock and reinstalling

I'm not a react-native expert. But when clone this repo: deep-links-movie-tutorial. I run yarn install then the app built successfully. However, if, after cloning the repo, I delete the yarn.lock file and then run yarn install, I get the…
0
votes
0 answers

How to check the versions of dependencies with yarn 2?

With yarn 1, there was a way to check the currently installed packages for dependency conflicts or for other problems, with the yarn check command, as we can see, for example, here. How can I do the same with yarn 2?
peterh
  • 11,875
  • 18
  • 85
  • 108
0
votes
0 answers

Yarn build causes next.js site to crash for a minute till it finishes

as the title pretty much says it all, yarn next build/yarn build causes the website to return 'internal server error'. It is hosted on ubuntu with nginx, this is the one-liner I made and use to 'deploy' yarn next build && pm2 delete WEBSITENAME &&…
ThomasDEV
  • 75
  • 7
0
votes
0 answers

How to properly set up new Node project with Yarn and its `pnp` strategy?

I'm thoroughly following Yarn's installation and usage manual, but immediately stumble upon this error: enc@alpha:~/Projects/personal/yarn-test/src$ node app.js node:internal/process/esm_loader:97 …
yar
  • 47
  • 6
0
votes
2 answers

yarn installing esbuild "@esbuild/darwin-arm64" instead of "@esbuild/linux-arm64" on Docker

I'm setting up a Rails 7 application using Tailwind CSS and ES Build. The application was built using the following command: rails new app -d postgresql --css=tailwind --javascript=esbuild When I run the application in the docker container, I keep…
0
votes
0 answers

Why lerna publish command fails with 503 Service Unavailable?

Trying to execute script from package.json in folder Web "lerna publish --no-private --no-git-tag-version --no-push". Process fails with lerna ERR! E503 503 Service Unavailable - PUT. So it looks like problems with corporate proxy. But at the same…
Vera
  • 51
  • 1
  • 6