I have a repo containing subdirectories for each p...
# seed
m
I have a repo containing subdirectories for each part of the project (back, front, etc.). The serverless part is in the
back/
subdirectory. Inside this subdirectory is a yarn mono-repo, with all dependencies installed at
back/
level. To make Seed installing dependencies, I copy the package.json and yarn.lock files at the root level during the 'before compile' step of the Seed.yml. I don't know why, but Seed decided to install dependencies using npm instead of yarn, despite the yarn.lock file. Any idea why? Or any way to force Seed using yarn?
f
Hey @Maxime, SEED decides what packager at the very beginning of the build process, before getting to the
Compile
step.
That said, if Seed finds a
yarn.lock
either in the root of the repo, or in the service folder, it will use yarn.
Do u have a
yarn.lock
in either of those 2 folders?
m
Thanks for the explanation @Frank. I only have it at the
back/
level, as no dependencies are installed at the root level and each Yarn workspace only has a package.json file
Is there any other way to force Yarn?
f
If u have
yarn.lock
at the service level ie.
back/
, Seed should use Yarn.
Can you send me a link to your build on Seed?
I will get the team to take a look.
Thanks for your help
f
Ah.. I see. So the services are inside the subdirectories of
back/
The easiest way would be to override the
compile
hook in side ur
seed.yml
, ie.
Copy code
compile:
  - yarn install
This will override the default behavior of Seed doing an
npm/yarn install
at the root and at the service level.
Let me know if this makes sense.
m
Thanks for the investigation, i'll try it!
Sorry for the late answer. It works perfectly, thanks for your help!