简体   繁体   中英

how to deploy a monorepo with turborepo to digital ocean?

I have a monorepo managed with turborepo. It has two packages: client and api inside packages/* in the root folder. I'm trying to deploy 'api' to digital ocean but when trying to deploy it comes that it fails because as I'm using turborepo and it does not generate individual yarn.lock files to each package. this is my error output

[2023-01-16 18:06:59] │ project does not contain a package manager lockfile
[2023-01-16 18:06:59] │ Error: package-lock.json does not exist. Please commit either a 
                 package-lock.json or yarn.lock file to your repository and try again.
[2023-01-16 18:06:59] │ ERROR: failed to build: exit status 1

As I have read. turborepo generates just one yarn.lock file into the root folder but I don't know how to deploy an individual package

You need to set Source Directory to / and then use the following build command:

yarn build --filter=./packages/api

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM