Unable to change build command for Cloudflare Workers and Pages

I am using Cloudflare Workers and Pages for my project, and I am trying to modify the Node.js deployment build command. According to the documentation, I should be able to change the build command by navigating to Settings → Build configurations → Build command.

I updated the build command to include a force tag: npm install --force

However, this change does not seem to be reflected in the actual build process. The build logs show that it still uses the default command: Installing project dependencies: npm clean-install --progress=false

I have followed the documented approach to change the build settings, but it does not appear to be working as expected. I would appreciate any help or guidance on how to properly modify the build command for my Cloudflare Workers and Pages project.

Please let me know if there are any additional steps I need to take or if there is a different way to configure the build settings.

Thanks in advance!

Additional Information:

  • Cloudflare product: Workers and Pages
  • Programming language: Node.js
  • Current build command: npm install --force
  • Expected behavior: The build process should use the custom build command specified in the Settings.
  • Actual behavior: The build process continues to use the default command npm clean-install --progress=false

Let me know if you need any further information or clarification regarding this issue.

1 Like

i have the exact same issue did you ever figure it out?

You can set an environment variable SKIP_DEPENDENCY_INSTALL (to any value) to make the build system not run its default npm clean-install. Then you can put your own install command into your build command.