error command sh -c node-pre-gyp install --fallback-to-build

When attempting to run npm i after cloning my bot repo, I get this error. I am currently using Ubuntu 22.04 (LTS) and Node.js 18.17.1 (LTS). This is a fresh install. Below are the relevant logs. https://pastebin.com/2Q3WPWQf
29 Replies
Favna
Favna•14mo ago
sudo apt install python3 build-essential
Noxillio
Noxillio•14mo ago
Same thing
Favna
Favna•14mo ago
cant tell then. The error shows too little. If node-gyp fails then it should show much more...
Noxillio
Noxillio•14mo ago
I can share the whole file? Nothing appears wrong until that bit though
Favna
Favna•14mo ago
npm should write a log and it should tell you where so yeah I guess
Favna
Favna•14mo ago
npm why do you not show the error logs for node-gyp that's so silly idk if there is a config for it maybe something verbose log but this already looks verbose
Noxillio
Noxillio•14mo ago
hmmm
Favna
Favna•14mo ago
well if you dont intend to use @sapphire/type you can remove it from your packagfe.json it's only useful for eval commands just keep in mind you then can also not use zlib-sync or bufferutil which make DJS more efficient because they're native deps too
Noxillio
Noxillio•14mo ago
npm i has a verbose flag, gonna try that and see what happens nothing extra from gyp
Favna
Favna•14mo ago
jw can you try using yarn install? possibly you need to install yarn first with npm i -g yarn
Noxillio
Noxillio•14mo ago
can try yarn but also is node-gyp supposed to be global
Favna
Favna•14mo ago
it's bundled with npm
Noxillio
Noxillio•14mo ago
i dont have it
Favna
Favna•14mo ago
in fact npm i -g node-gyp does jack shit unless you configure npm to use the non bundled version
Noxillio
Noxillio•14mo ago
node-gyp is a command right because i cant run it says it doesn't exist
Favna
Favna•14mo ago
yes it's bundled not publicly avail not on the PATH i mean
Noxillio
Noxillio•14mo ago
ah that'd be why hm
Favna
Favna•14mo ago
if you go to where npm is you'll find it unless ofc they stopped bundling it with npm v10 idk what the breaking changes are for npm v10 ive only used v9 most recently
Noxillio
Noxillio•14mo ago
Could this be because I installed Node from snap?
Favna
Favna•14mo ago
dunno. Maybe.
Favna
Favna•14mo ago
I recommend using https://volta.sh
Noxillio
Noxillio•14mo ago
tried installing volta using curl. the curl installed from snap is broken as fuck so it didn't work. installed it from apt, worked im never using snap again shit's clearly useless
Favna
Favna•14mo ago
fact
Noxillio
Noxillio•14mo ago
gonna try this again now cause i installed node using volta. it didn't see the one installed by snap either
Favna
Favna•14mo ago
snap sucks
Noxillio
Noxillio•14mo ago
and that indeed was the answer npm i was successful this time around why does snap exist Sad
Favna
Favna•14mo ago
you probs had to install build-essential through snap before if that even exists not worth the effort now
Noxillio
Noxillio•14mo ago
well i did that first command you suggested, that should have installed build-essential but guess we got it now thanks 🫂
Want results from more Discord servers?
Add your server