Questions tagged [yarn-lock.json]
90 questions
27
votes
2 answers
What is the integrity property inside yarn.lock file?
For some reason, the command yarn is modifying the file yarn.lock with a new property to every dependency: integrity.
Git diff:
+integrity sha1-zgBCgEX7t9AxwWp7+DV4nxU2arI=
I couldn't find documentation about it so my question is - What is it?

Stav Alfi
- 13,139
- 23
- 99
- 171
25
votes
4 answers
error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`
I have an issue regarding one dependency in my yarn.lock file. The issue is with ldapjs, the latest version has a bug regarding special characters in user or password so I want to freeze it in the latest working version which is 1.0.2.
As I commited…

Leonardo Ferreira
- 451
- 1
- 4
- 7
19
votes
11 answers
yarn build in ReactJS, Allocation failed - JavaScript heap out of memory
In local enviroments I have no problem, but running a production enviroment on jenkins with this script it does:
yarn install --production
yarn build
The build takes like 5 minutes, in the end, jenkins exit with this console output error:
+ yarn…

pmiranda
- 7,602
- 14
- 72
- 155
12
votes
2 answers
yarn - Proper way to quickly check if `package.json` and `yarn.lock` requirements are satisfied?
I'd like to verify whether all the dependencies in my project (package.json and yarn.lock) are satisfied without having to run yarn install (which builds out a whole dependency tree and makes network requests)
At first, I was very hopeful that yarn…

user2490003
- 10,706
- 17
- 79
- 155
12
votes
2 answers
Why is my yarn.lock file changing when running yarn install after incrementing version in package.json?
I have read through the documentation on yarn commands and yarn.lock, and I was led to believe that the whole point of a yarn.lock file was to use the version specified in that file.
What I was curious about was: when is the version specified in…

Michael
- 3,093
- 7
- 39
- 83
8
votes
2 answers
No preset version installed for command yarn
I have problem with asdf.
I have already install nodejs latest.
asdf install nodejs latest
...
asdf local nodejs latest / asdf global nodejs latest
But if I try
yarn
No preset version…

Luboš Hájek
- 342
- 4
- 14
8
votes
1 answer
Why do resolutions get removed from package.json after running yarn install?
After upgrading to yarn 3, when I run yarn install, the resolutions are getting removed from package.json and added in yarn.lock file.
Are resolutions not supposed to reside in package.json when using yarn 3?

John Web
- 83
- 3
8
votes
1 answer
Force version of transitive dependency (dependency of dependency) with yarn
I am using the package "csv-file-validator": "^1.8.0" which comes with 3 dependencies
famulus "2.1.2"
lodash "4.17.15"
papaparse "^5.2.0"
I would like to update/force the version of lodash to be 4.17.20. I found about selective dependency…

Léo Coco
- 4,022
- 11
- 52
- 97
7
votes
6 answers
Zlib error when attempting to run npm install or yarn
I have just made some pulls from my library's from GitHub, I was using my windows computer to do the coding in VSCode. The code has no problem, although when I attempt to run npm install or yarn install to get the node_modules and the yarn.lock I…

Nilton Schumacher F
- 814
- 3
- 13
- 43
6
votes
0 answers
Issue with yarn's lockfile being modified
I'm using yarn berry, specifically version 3.0.0, but was also having the same issue with 2.4.2. When I run yarn install --immutable in CI I get the error:
[2021-07-27T04:51:41Z] ➤ YN0028: │ The lockfile would have been modified by this install,…

n00b
- 5,843
- 11
- 52
- 82
5
votes
0 answers
Yarn: check if installed packages match yarn.lock and/or packages.json?
Is there a Yarn command that compares the node_modules folder with yarn.lock to see if it matches? Alternatively, is there a way to check if new packages have been added to packages.json since the last time yarn install was ran?

Leo Jiang
- 24,497
- 49
- 154
- 284
4
votes
4 answers
yarn "Error: EISDIR: illegal operation on a directory, read"
Suddenly yarn is not working. Npm works perfectly but yarn only is able to run yarn -v, any other command such as yarn, yarn test, or yarn watch shows this error
Arguments:
/home/my.user/.nvm/versions/node/v14.15.4/bin/node…

Jhonatan
- 1,191
- 2
- 10
- 21
4
votes
0 answers
How to get yarn.lock to point to most recent commit
I have a dependency in my package.json that points to a git repo and branch (eg git+ssh://git@github.com/some-repo#some-branch-name). When I install dependencies, yarn resolves the commit-ish to a specific commit hash in yarn.lock, which causes my…

Jeremy Vessella
- 41
- 2
3
votes
1 answer
Yarn installation problem with optional dependencies with Next.js and React
I'm using yarn install, but I have a problem called
gyp-error
Im not using python in my proyect.
im also have another subfolder for google-vision
this is my problem:
yarn install v1.22.19
info No lockfile found.
[1/4] Resolving packages...
warning…

user20029709
- 31
- 3
3
votes
1 answer
Yarn Upgrade does not remove old version of js-yaml package in yarn.lock file
I have a high sev git hub security vulnerability for js-yaml in my yarn.lock file on a rails app.
Remediation
Upgrade js-yaml to version 3.13.1 or later. For example:
js-yaml@^3.13.1:
version "3.13.1"
I have run yarn upgrade js-yamlwhich has…

saharkhankhan
- 31
- 6