简体   繁体   English

如何将带有 turborepo 的 monorepo 部署到数字海洋?

[英]how to deploy a monorepo with turborepo to digital ocean?

I have a monorepo managed with turborepo.我有一个用 turborepo 管理的 monorepo。 It has two packages: client and api inside packages/* in the root folder.它有两个包:根文件夹中的 packages/* 中的 client 和 api。 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我正在尝试将“api”部署到数字海洋,但在尝试部署时它失败了,因为我正在使用 turborepo,它不会为每个 package 生成单独的 yarn.lock 文件。这是我的错误 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 turborepo 只在根文件夹中生成一个 yarn.lock 文件,但我不知道如何部署一个单独的文件 package

You need to set Source Directory to / and then use the following build command:您需要将Source Directory设置为/然后使用以下构建命令:

yarn build --filter=./packages/api

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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