When deploying multiple apps/components with App Platform from a monorepo using workspaces for each app, App Platform caches the root package.json
file when it should also take into account the workspace’s package.json
file too. When the workspace dependencies change they’re not installed because App Platform incorrectly thinks since the root dependencies haven’t changed that it’s safe to use the cached node_modules.
For now I’m stuck setting global env NODE_MODULES_CACHE=false
.
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.
It sounds like App Platform isn’t properly handling workspace-specific dependencies in your monorepo and relies on the root
package.json
for caching. 🚧 SettingNODE_MODULES_CACHE=false
is a workaround for now, but hopefully, App Platform improves its caching logic to account for workspace-level changes soon! ⚙️📦Hey @wakatime,
I don’t think that there are officially any plans for this, but this sounds like a great idea!
The best thing to do to get your voice heard regarding this would be to head over to our Product Ideas board and post a new idea, including as much information as possible for what you’d like to see implemented.
- Bobby.