R
Railway16mo ago
noah

custom npm install command

hey yall! i had a question about custom npm installations: it doesnt seem like that is yet available in your ui? maybe im looking in the wrong place but would love some help! thanks!
13 Replies
Percy
Percy16mo ago
Project ID: 5b02d386-c049-460c-bcf9-d7235c54b6f9
noah
noahOP16mo ago
5b02d386-c049-460c-bcf9-d7235c54b6f9
Brody
Brody16mo ago
so by default it should be npm ci if there's a package lock file, otherwise it's npm i can you tell me why these install commands don't work for you?
noah
noahOP16mo ago
i got this resolved, thanks
Brody
Brody16mo ago
would you mind telling me anyway? what was your desired install command?
noah
noahOP16mo ago
npm i --force
Brody
Brody16mo ago
oh that's not a good idea but I'm not gonna open that can of worms
noah
noahOP16mo ago
its due to some of the dependencies im working with. plus i believe in the newest npm versions, --force is better than --legacy-peer-deps
Brody
Brody16mo ago
neither is good lol
Slaven
Slaven7mo ago
Hi, I know --force is not a good idea, but I need to use it. How can I add npm i --force as a custom install script?
Brody
Brody7mo ago
with a nixpacks.toml file -
[phases.install]
cmds = ['npm i --force']
[phases.install]
cmds = ['npm i --force']
Slaven
Slaven7mo ago
Thanks Brody, I dug a bit deeper and I found this in the forum:
No description
Brody
Brody7mo ago
yep, thats the correct way, but you said you where aware it wasnt a good idea and asked anyway, so i answered your question directly
Want results from more Discord servers?
Add your server