Report this

What is the reason for this report?

How to setup DO app platform with pnpm monorepo

Posted on May 1, 2024

I setup digital ocean app platform. Ran static site building with pnpm monorepo.

At first run all went great, but at second, when digital ocean took node_modules from cache I received error of empty node_modules folder. I tried install dependencies from building script as it’s describe in article, but this isn’t help. Is it any I can do to fix this currently?

https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/#pnpm

pnpm 9.0.6 installed
[INFO] No file to start server
[INFO] either use 'docker run' to start container or add index.js or server.js
Project contains pnpm-lock.yaml, using pnpm
Reusing cached node_modules from pnpm-lock.yaml
Running custom build command: pnpm run setup && cd apps/private && pnpm run build

> app_name@1.0.0 setup /workspace
> pnpm install --production=false

Scope: all 6 workspace projects
? The modules directories will be removed and reinstalled from scratch. Proceed? (Y/n) ‣ true
> private@0.0.0 build /workspace/apps/private
> tsc && vite build

sh: 1: tsc: not found
ELIFECYCLE  Command failed.
WARN   Local package.json exists, but node_modules missing, did you mean to install?
building: exit status 1
ERROR: failed to build: exit status 1

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.