How to modify the behavior of the initializing step? Like preventing `npm install`

@muspi-merol It may not be applicable for your situation, (and doesn’t align with your wider configuration requests), but have you considered trying the legacy-peer-deps flag?

https://docs.npmjs.com/cli/v9/using-npm/config#legacy-peer-deps

It can be applied with the NPM_FLAGS environment variable, for which there is more detail here:

https://answers.netlify.com/t/deploy-failed-today-build-was-terminated-build-script-returned-non-zero-exit-code-1/64450/2

With #5, if you did want to delete your node_modules you could just do so within your build command, as the node_modules won’t be in your Publish directory they could be safely deleted after build but prior to deployment.

1 Like