R
Railway15mo 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
Percy15mo ago
Project ID: 5b02d386-c049-460c-bcf9-d7235c54b6f9
noah
noah15mo ago
5b02d386-c049-460c-bcf9-d7235c54b6f9
Brody
Brody15mo 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
noah15mo ago
i got this resolved, thanks
Brody
Brody15mo ago
would you mind telling me anyway? what was your desired install command?
noah
noah15mo ago
npm i --force
Brody
Brody15mo ago
oh that's not a good idea but I'm not gonna open that can of worms
noah
noah15mo 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
Brody15mo ago
neither is good lol
Slaven
Slaven6mo 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
Brody6mo ago
with a nixpacks.toml file -
[phases.install]
cmds = ['npm i --force']
[phases.install]
cmds = ['npm i --force']
Slaven
Slaven6mo ago
Thanks Brody, I dug a bit deeper and I found this in the forum:
No description
Brody
Brody6mo 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