npm build script not running during app build

I have an app consisting of a PHP backend and Vue 3 frontend. The app platform is able to build/deploy the site, however I noticed that it’s always displaying the old, pre-compiled code for the frontend. It’s simply not running the build script.

I assume this is because I have the following file structure:

\package.json <-- backend

\frontend\package.json <-- Vue

I have the necessary scripts in both under build:digitalocean but nothing appears to run.

If the build won’t run these scripts automatically there’s no point in me using apps at all, so hopefully this can be fixed.

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
August 3, 2023

Hi there,

Monorepos are a common setup for many apps. What you could do is follow the steps here on how to configure your build process:

We provide the following sample monorepos that you can deploy using App Platform:

Also for a PHP and Node example, you can take a look at the following Laravel project that also has a similar setup as you’ve described:

Hope that this helps!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel