I connected my github repo with heroku so I can have deployments from there automatically. I created a react app and I have some dependecies that requires " npm install --legacy-peer-deps ", and when heroku is building the app, of course it doesn't use that command. How can I overwrite "npm install" with "npm install --legacy-peer-deps " ? I tried to put in the package.json at scripts where is build insted of "react-scripts build ", I've put " react-scripts build && npm install --legacy-peer-deps" but it didn't work.
This is what it says in the error:
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Thank you in advance