Questions tagged [yarnpkg-v3]

Use this tag for version specific questions about Yarn version 3.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. More info here: https://dev.to/arcanis/yarn-3-0-performances-esbuild-better-patches-e07

35 questions
2
votes
1 answer

Yarn berry installs node_modules

node.js version: 16.14.0 yarn version: 3.1.1 macOS: 11.6.4 (Big Sur) I set up and continue to work on a yarn workspace project. I committed all files including .yarn, .pnp.cjs, .pnp.loader.mjs on the github repo. However, I got an issue after I…
puffin
  • 21
  • 2
2
votes
1 answer

Update package installed from git in Yarn 3

How to update a proprietary dependency installed from Git repo with Yarn 3? package.json entry: "@foo/utils": "git+https://gitlab+deploy-token-...:...@gitlab.com/foo/bar.git#ISSUE-6652-some-git-branch", yarn up @foo/utils results in the following…
amik
  • 5,613
  • 3
  • 37
  • 62
2
votes
1 answer

Update previously patched package with Yarn Berry

I'm using Yarn@3.0.2 in my project. I have patched a package (@pkg/pkg) with the command yarn patch @pkg/pkg and I am using it as a devDependency with the patch: protocol. Now I need to make another patch to the same package - but when I run the…
SchlagerKhan
  • 61
  • 1
  • 6
1
vote
0 answers

How can I import a stylesheet from a Node module that is Yarn 2+ Plug-n-Play installed?

Got a new job back in January. Our dependencies have not been well maintained, and given that the other developer's on vacation for a couple weeks, I've been given carte blanche to get our dependencies as up-to-date as I can in those two weeks. I…
Lego
  • 86
  • 1
  • 7
1
vote
1 answer

Cannot find module with coc-tsserver (ts2307)

I am using NeoVim with CoC for TS development of yarn-3 pnp-enabled project. At some point the editor stopped seeing imports and started complaining that the imported module does not exist. (see screenshot). I already configured SDK for vim and…
1
vote
0 answers

How does Yarn install decide whether to throw YN0070 and use node_modules vs PnP?

I have 2 different branches in my project. When I do yarn install in one of them, it starts off with: ➤ YN0070: Migrating from Yarn 1; automatically enabling the compatibility node-modules linker ... then continues. This creates a .yarnrc.yml file…
Nathan Tew
  • 432
  • 1
  • 5
  • 21
1
vote
0 answers

Auto importing doesn't work with @emotion/styled

I practice yarn-berry with @emotion, vite, react. But auto importing doesn't work with @emotion/styled. error image (doesn't auto-importing @emotion/styled) @emotion/react works well like this. success image (@emotion/react) I did re-install after…
최성민
  • 11
  • 2
1
vote
0 answers

TypeError: Class extends value undefined is not a constructor or null when using yarn pnp and typescript4

I am trying antlr4ts-sql in my project, which is part of monorepo using jazelle, typescript, yarn pnp. Versions are: % jz version actual: 0.0.0-standalone.82 system: 0.0.0-standalone.74 % yarn -v 3.3.0 My codes (from antlr4ts-sql repo): import {…
hehe123456
  • 31
  • 2
  • 5
1
vote
1 answer

Cannot find name 'describe' when using yarn pnp and ts-jest (jest) in monorepo

I am using jazelle and yarn pnp in monorepo. but I cannot run tests like jz test. it seems that @types/jest not setup properly. My errors: FAIL __tests__/autocomplete/presto/suggest.test.ts ● Test suite failed to run …
hehe123456
  • 31
  • 2
  • 5
1
vote
1 answer

VS Code and Yarn PnP

Are there any incompatibilities with the yarn pnp sdk and typescript? I've installed the sdk via yarn sdks and in the TS Server logs it appears to be pulling from the cache…
Anthony
  • 7,638
  • 3
  • 38
  • 71
1
vote
1 answer

Yarn run someScript outputs "command not found: export"

I've upgraded to the yarn version 3.1.0 (previously was 1.x and everything worked fine). In the package.json of the project there is a script with the next structure: "scripts": { "someScript": "export NODE_ENV=development && ...", } When…
olegzhermal
  • 799
  • 10
  • 26
0
votes
0 answers

What are the use cases for Yarn `enableGlobalCache`?

The Yarn package manager has an option called enableGlobalCache which makes yarn store its package cache in a global folder. Yarn's normal mode is to store its cache in which is in the project folder by default (.yarn/cache). What is…
Matthias
  • 13,607
  • 9
  • 44
  • 60
0
votes
0 answers

Mimic yarn 1.x behaviour in yarn 3.x

I have a project structure like so: library/ - package.json - example/ --- package.json My example package is a CRA. Until now, to be able to have my 'example' package use the parent folder as a package library, I would do these 2 simple…
Chaoz
  • 2,119
  • 1
  • 20
  • 39
0
votes
0 answers

Is it possible to define Yarn 3 flags as defaults?

I've added yarn-plugin-outdated to my project. There are some CLI flags supported such as --url, so I can run yarn outdated --url and all outdated packages will be listed with URLs. Is there any way to set this flag as default, so I don't need to…
acidernt
  • 2,173
  • 2
  • 19
  • 33
0
votes
0 answers

In yarn pnp and workspaces... How can I resolve the path to package files in the .yarn/cache/ directory?

I used to run this command in yarn version 1 on the command line... yarn --cwd packages/mypackage/ node --trace-deprecation node_modules/webpack/bin/webpack.js --env env=dev ...so now what would be the equivalent to the previous command when using…
god_is_love
  • 571
  • 5
  • 18