9

I want to deploy my app from my monorepo to GAE. The app depends on local packages that I pre-publish to github packages. To make life easy, I just tell my app to always get latest:

  "dependencies": {
    "@thecointech/email": "*",
    "@thecointech/logging": "*",
    "@thecointech/utilities": "*",
    ...

All of this works fine.

The problem comes when I try to include the yarn.lock file into the deployment. Following suggestions in this yarn thread: https://github.com/yarnpkg/yarn/issues/5428, I copy the root yarn.lock local to the app directory and try to deploy. GAE returns the error:

error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`

From what I can tell, the problem stems from the fact that my monorepo lockfile does not include entries for my own packages. When installing on GAE, it rightly sees these entries missing and wants to add them - and we error.

For now, I'm simply not including the lockfile and spec'ing deps exactly, but seems wrong. This should work, it's a common usecase and workspaces have been around long enough. Have you tried something similar? Is there any way to force yarn.lock to include my dependencies?

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
FrozenKiwi
  • 1,362
  • 13
  • 26
  • Ever found a solution for this? – BravoZulu Apr 30 '21 at 13:56
  • No, but I find it weird - somebody must have come across this, right? I might add a bounty to the question and hope it catches someones eye – FrozenKiwi Apr 30 '21 at 15:50
  • 2
    I saw many threads on yarn's github trying to figure this out and I think the solution is to update to yarnV2, which is not possible for me right now. It sucks not being able to solve this easily – BravoZulu Apr 30 '21 at 17:02
  • Yarn v2 is so different from Yarn v1 it might as well have a different name. I don't view it as a viable solution for most people. – Carl Patenaude Poulin May 07 '21 at 15:15

0 Answers0