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
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
I’m having a similar issue, and it’s not a monorepo:
Hi there,
Quick update here in case that anyone comes across this in the future.
DigitalOcean have updated the NodeJS buildpack for App Platform.
The buildpack now supports the PNPM package manager. For more information and configuration options, see the buildpack’s documentation page.
Hope that this helps!
Best,
Bobby
We are also experiencing issues deploying our pnpm monorepo. For us,
pnpm
doesn’t seem to be installed before thenode_modules
are attempted to be installed.