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.
Questions tagged [yarnpkg-v2]
192 questions
0
votes
1 answer
Webpack & Babel - Unable to run dev-server after nodejs and yarn update
I am upgrading Node.js from 8.11.1 to 12.20.0 and yarn from 1.22.4 to 2.4.0. My webpack version is 4.41.2.
I have upgraded Node.js using nvm and by running the commands below and then updated babel.rc
yarn set version berry
yarn rebuild…

Kermit
- 2,865
- 3
- 30
- 53
0
votes
1 answer
winston logging from location in yarn 2
my log message here is just info: after all completed for some reason something is printing console.log and at Console.log as well as some blank lines for every log message.
➤ YN0000: [@bb/common-framework]: console.log
➤ YN0000:…

xenoterracide
- 16,274
- 24
- 118
- 243
0
votes
1 answer
Running scripts with Yarn 2's PnP
To run a script with Yarn 2's PnP, one should run yarn node script.js, rather than node script.js.
Is there an universal way to run things like ts-node (i.e. where you don't call node directly, thus you can't replace it with yarn node) with Yarn 2's…

John Smith
- 3,863
- 3
- 24
- 42
0
votes
1 answer
Is `pnpify --sdk vscode` needed if you aren't using PnP with Yarn 2?
We are slowly legging into using Yarn 2 and have opted to not use the Plug-n-Play feature.
Disable PnP Instructions
// .yarnrc.yml file
yarnPath: '.yarn/releases/yarn-berry.cjs'
nodeLinker: node-modules
We also use VS Code and the Yarn 2 migration…

GollyJer
- 23,857
- 16
- 106
- 174
0
votes
2 answers
Workspace-global bin-scripts in Yarn 2
I have a yarn 2 workspaces project with two workspaces:
|-foo
\-bar
Now, in the root package.json, I pull in common dev-depenencies:
"devDependencies": {
"@rollup/plugin-commonjs": "^14.0.0",
"@rollup/plugin-node-resolve": "^8.4.0",
…

user3612643
- 5,096
- 7
- 34
- 55
0
votes
1 answer
Fallback pool in yarn v2 "loose" mode
From the docs on the loose mode of yarn v2:
Yarn ships with a "loose" mode which will cause the PnP linker to work in tandem with the node-modules hoister - we will first generate the list of packages that would have been hoisted to the top-level…

Paul Razvan Berg
- 16,949
- 9
- 76
- 114
0
votes
1 answer
Yarn unable to add packages (both inside and outside workspaces)
Yarn unable to add packages (both inside and outside workspaces)
Hi there, I'm using Yarn 2, I don't seem to be able to install any package. I always get the following formatted error:
$ yarn add useful-package
➤ BR0027: useful-package@unknown…

Matthew Spence
- 986
- 2
- 9
- 27
-1
votes
1 answer
Why am I told to install versioned Expo CLI when it's already installed?
When I run
expo-cli doctor
I get
WARNING: The legacy expo-cli does not support Node +17. Migrate to the versioned Expo CLI (npx expo).
But when I run
yarn expo doctor
I get
expo doctor is not supported in the local CLI, please use expo-cli doctor…

orome
- 45,163
- 57
- 202
- 418
-1
votes
1 answer
"yarn init" is not letting me start new project
I installed Yarn Package Manager, so i can use with JavaScript.
But the problem is that when i enter the commands "yarn init", the following command prompt questions of creating your project name, description and etc.. does not follow. The only…

Calculate
- 329
- 1
- 5
- 19
-1
votes
1 answer
Yarn pnp causes drive letter mismatch on Windows with Testcafe
Testcafe is unable to compile my test with yarn pnp, I run into the following error after switching to yarn pnp by setting these two properties inside of .yarnrc:
nodeLinker: "pnp"
pnpMode: "strict"
The error message:
code: 'E1035'
Error:…

Ari
- 1,361
- 1
- 15
- 23
-1
votes
1 answer
Mongo Instance server failed saying memory resources in docker
Mongo server failed while running yarn test showing memory resources error in docker

NullPointerException
- 11
- 2