1

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 > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > node-gyp > request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
warning @rails/webpacker > node-sass > request > har-validator@5.1.5: this library is no longer supported
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
warning @rails/webpacker > webpack > watchpack > watchpack-chokidar2 > chokidar > fsevents@1.2.13: 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 > resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
warning @rails/webpacker > webpack > micromatch > snapdragon > source-map-resolve > urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
warning popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
warning webpack-dev-server > chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
stevec
  • 41,291
  • 27
  • 223
  • 311

2 Answers2

2

Run just: yarn from the terminal

rigyt
  • 2,219
  • 3
  • 28
  • 40
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.

Freewalker
  • 6,329
  • 4
  • 51
  • 70