72 questions
0 votes
1 answer
195 views
yarn set version 3.5.1 showing old version installed
My project is requiring to install 3.5.1 version of yarn when i try yarn set version 3.5.1 it's giving error This project's package.json defines "packageManager": "[email protected]". ...
0 votes
1 answer
228 views
lint-staged is linting more than just staged files
THE PROBLEM I have two JavaScript files in packageA that I know have lint errors. I fixed and staged one. When I try to commit the staged file, it fails because of the unfixed/unstaged file. SETUP I ...
1 vote
1 answer
45 views
Yarn shell does not support user's home directory (tilde ~)
Modern Yarn portable shell seems to not have implemented user's home directory (~) so commands like echo ~/.foo would fail. Instead of explicity calling shell, is there any equivalent to this symbol?
1 vote
0 answers
81 views
How to use yarn link as npm link in yarn 3?
I know that there are some related posts but I cannot find proper way to use yarn link in my project. I use yarn 3.5. I got structure Projects: LibA LibB Package.json And separate app Where I should ...
0 votes
1 answer
168 views
how to make yarn workspaces install package.json located in packages sub folder?
I have a folder structure like this: root/ packages/ snackbar/ src/ example/ src/ babel.config.js metro.config.js package.json tsconfig.json ...
0 votes
0 answers
157 views
react native 0.74.2 yarn install error "YN0007: │ com.shiva.test@workspace:. must be built because it never has been before or the last one failed"
react native 0.74.2 yarn install giving following error "YN0007: │ com.shiva.test@workspace:. must be built because it never has been before or the last one failed" also yarn lifecycle ...
1 vote
0 answers
96 views
React Native 0.74.2 yarn lifecycle method is not called after running 'yarn install'
How to call lifecycle events of 'yarn install' on react native 0.74.2 and yarn version is 3.6.4 I've added yarn lifecycle methods in my package.json under the scripts section. However, when I run the ...
1 vote
3 answers
2k views
Failure of pod install for the React-native project using Yarn Berry
Simply, I can't install the pod for the react-native project when I use the yarn - Berry or any newer version 3.x or 4.x. Is there anyone who made this work? Thanks! This can be re-introduced by ...
5 votes
0 answers
653 views
react app throwing error with node upgraded to 18 and webpack resolve extension
We're in the process of upgrading our React project's Node version from 10 to 18. However, after the upgrade, we are encountering issues with our webpack configuration, specifically with the resolve ...
0 votes
1 answer
99 views
Using yarn in firebase-generated yaml file causes build fail in guthub action
My build step fails when running the following github action. Note that I'm using yarn v1.22.19. yml (abbreviated): # This file was auto-generated by the Firebase CLI # https://github.com/firebase/...
0 votes
1 answer
463 views
Can I use protobufjs with Node 20.9.0 and yarn 3.2.4?
I want to use node 20.9.0 and yarn 3.2.4. If I do: mkdir test cd test yarn init yarn add protobufjs I get the following error: ➤ YN0000: ┌ Resolution step ➤ YN0000: └ Completed in 0s 813ms ➤ YN0000: ...
4 votes
0 answers
1k views
How to download and install packages from (private) artifactory and yarn v4?
In our project we are currently using yarn v1. We are able to download packages from our private registry (artifactory). Our packages are scoped packages, which means our package.json looks like this: ...
0 votes
1 answer
88 views
yarn build "Cannot find name" error for typescript
I have the following .tsx component: const Header = ({ dict: map, lang: string }) => { return ( <header className="flex items-center justify-between py-10"> <div> ...
0 votes
1 answer
262 views
yarn run: can I get the caller path?
I'm using Yarn 3's workspaces. If I have a script in a package.json { "name": "myscripts", "scripts": { "migrate": "./migrate up -m src/migrations&...
1 vote
0 answers
174 views
Yarn 3 how to fix incompatible transitive dependencies?
Say I have a dependency graph like this: root - d1 - d3 (v1.1) `- d2 - d3 (v1.2) and for some reason d3 v1.1 and v1.2 are incompatible (i.e., d1 has to use d3 v1.1, d2 has to use d3 v1.2). Is ...