'Force yarn.lock to generate?
I have a rails app, I deleted yarn.lock (due to some complicated errors), but I would like to regenerate it.
I tried yarn install -std:c++latest and yarn install --check-files -std:c++latest. As far as I can tell, these commands succeed, but I don't see any new yarn.lock file.
Any ideas how to force it to be generated?
(open to hacky ideas - I am not so familiar with the inner workings of these package managers so I'm unclear how to solve)
Notes
When I run yarn install --check-files -std:c++latest, I see:
yarn install --check-files -std:c++latest
warning @rails/webpacker > node-sass > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > node-gyp > [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > request > [email protected]: this library is no longer supported
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2.
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > [email protected]: Please see https://github.com/lydell/urix#deprecated
warning [email protected]: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
warning webpack-dev-server > [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
Solution 1:[1]
Run just: yarn from the terminal
Solution 2:[2]
One reason a yarn.lock file would not generate is that frozen-lockfile was specified. That option prevents creation of a lockfile. You can check your .yarnrc to make sure it's not present.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | rigyt |
| Solution 2 | Freewalker |
