Unable to override build settings when deploying
I'm having trouble with overriding the pages build configuration.
Changing the build command to
npm install --force && npm run build
doesn't seem to have an effect. npx wrangler pages deploy
does work as a workaround, but prevents using git integration. The current setting of npm clean-install
does not like dependency conflicts.
A second workaround is to use git-actions. However, it seems unwieldy when the problem can be solved with just overriding the build command.
Anyone have any insights on this issue? There are other similar posts from a while ago with no useful conclusions.
Thanks for looking!2 Replies
changing the build command to npm install --force && npm run build might not work if the settings are cached or not properly applied. try clearing the cache or rechecking the settings in cloudflare pages. using npx wrangler pages deploy works but breaks git integration, and git actions are a bit heavy just to override a build command.
you could also try adding a .npmrc file to manage npm install --force directly without needing to override the entire build command.
thank you - I will try that solution. Also tagging @Shane who had the same issue https://discordapp.com/channels/595317990191398933/1296498042505138256