I am trying out digital ocean platform, have been using heroku; My project is a MEAN stack application. In heroku the build process worked like this; npm install the backend nodejs app; then that node app had a postinstall script that would run a required js script and also CD into my client directory and run the npm install for that directory, this client directory also had a post-install script to run ng build to build the angular repo for the nodejs to serve.
When I set up the repo to deploy to the DigitalOcean App Platform this nested npm install and commands do not seem to execute and build my frontend package.
I have been unable to find any questions or documents that reference this specific type of circumstance so I am hoping I am not asking an old question.
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Heya,
The essential idea would be to adjust your
build command
in the App specification to something like this:This command will make sure that your server-side dependencies are installed and built before it navigates to your client directory to do the same.
You can specify your build command while creating and configuring your app in the app specification settings. If you’ve already created your app, you can adjust the build command by re-deploying your app with the updated configuration. You can find more information about configuring your app here.
Please keep in mind that the above command is just an example and might need to be adjusted according to your app’s specific requirements.
Hope that this helps!