Question

ERROR DEPLOYMING LARAVEL APP TO APP PLATFORM

Hi, I have been running a number microservices on the App Platform for months now. As my services grow, I simply commit to my Git master Branch and CI/CD kicks in immediately (Good Stuff). But lately, whenever I try to push one specific Laravel service (namely “core-api”), The deployment fails and rollback to the last working version. Now I know for a fact that I have not messed with any configuration whatsoever, but I get an npm build error as show below:

 bash: line 1: npm: command not found
[core-api] [2022-04-06 10:09:11] building: exit status 127
[core-api] [2022-04-06 10:09:11] ERROR: failed to build: exit status 1
[core-api] [2022-04-06 10:09:15] 
[core-api] [2022-04-06 10:09:15] For documentation on the buildpacks used to build your app, please see:
[core-api] [2022-04-06 10:09:15]    PHP: https://do.co/apps-buildpack-php
[core-api] [2022-04-06 10:09:15] 
[core-api] [2022-04-06 10:09:15]  ! Build failed (145)

I do know why and I am at a loss. Please help me debug this…


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
July 5, 2022

Hi there,

Node and NPM will be installed only if you have the files package.json and package-lock.json in your repo.

If your app doesn’t have any Node.js dependencies, you can run npm init and then npm install to generate empty but valid package.json and package-lock.json files.

Best,

Bobby

Try DigitalOcean for free

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

Sign up