I have 3 angular apps. Configured them to run all 3 in a single App Platform application as 3 components.
App1 is working fine on “/” path. I’ve also added the catchall document so routing on app1 is working.
The issue is that when trying to access “/app2” or “/app3” I receive an blank page (the tab title is shown correctly, but the page is empty).
After pushing to master, the build command are the following ones, so the files are placed correctly:
"build": "ng build && mv dist/app1 app1",
"build": "ng build && mv dist/app2 app2",
"build": "ng build && mv dist/app3 app3"
When trying to access “/app2” or “app3” I also receive the following errors in console.
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!
Accepted Answer
I fixed the issue thanks to the DigitalOcean support:
" Hello,
Thanks for contacting DigitalOcean.
We understand you are seeing issues with the routing your applications. As those are Angular static site typically they expect to be routed to the / root folder by default. The error you are seeing in the browser console typically indicates as such. The site is not able to find the javascript it expects.
This sometimes has to do with your base_ref and setting that in the build command may help address this issue.
Some more details on some ways to address this can be found here: https://stackoverflow.com/questions/56632496/failed-to-load-module-script
If you have any questions, please let us know.
Regards, Nate Developer Support Engineer II Check out our community for great tutorials, articles and FAQs! https://digitalocean.com/community "
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.