Hello -
I am new to the Digital Ocean Apps platform and I am having an issue related to when the instance begins building my Node application. The issue is related to previously cached node_modules
during the build process. I have added a few modules but builds via DO do not reflect these module changes, as DO continues to use a cached version of node_modules
(as seen in the logs, I believe related to Docker and Buildpack?). The package-lock.json
is checked in, but I am unsure if this would resolve the issue or not.
How do I clear this cache to ensure the DO environment does not use cached assets?
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
Looking at your app’s build logs, it seems to be using Yarn instead of NPM to install dependencies. If a yarn.lock
file exists, App Platform will use Yarn, even if a package-lock.json
file exists.
Make sure you commit the dependency updates to yarn.lock
or remove it entirely if you don’t need it. This will invalidate the existing cache and install the right dependencies. Let me know if that works!
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.