Build failing with Husky / Svelte navigator app

For some reason my build is failing due to Husky not being installed. Its part of the Svelte-Navigator bundle. I’ve cleared the NPM cache etc. but no luck. It’s a plain Svelte app, not SvelteKit.

Netlify site name. Example: dev-wtw-vgp.netlify.app

Relevant parts of the Log
5:52:16 PM: Finished restoring cached node modules
5:52:16 PM: Installing npm packages using npm version 10.5.0
5:52:23 PM: npm ERR! code 127
5:52:23 PM: npm ERR! path /opt/build/repo/node_modules/svelte-navigator
5:52:23 PM: npm ERR! command failed
5:52:23 PM: npm ERR! command sh -c is-ci || husky install
5:52:23 PM: npm ERR! sh: 1: is-ci: not found
5:52:23 PM: npm ERR! sh: 1: husky: not found
5:52:23 PM: npm ERR! A complete log of this run can be found in: /opt/buildhome/.npm/_logs/2024-04-25T16_52_16_451Z-debug-0.log

This is expected. During the installation phase husky won’t be available. You should not be running the postinstall scripts that depend on a npm package during the installation phase.

You’d have to get rid of the dependency or find a way that makes sure if doesn’t get invoked when the build is running on Netlify.