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•15mo ago
sudo apt install python3 build-essential
Noxillio
NoxillioOP•15mo ago
Same thing
Favna
Favna•15mo ago
cant tell then. The error shows too little. If node-gyp fails then it should show much more...
Noxillio
NoxillioOP•15mo ago
I can share the whole file? Nothing appears wrong until that bit though
Favna
Favna•15mo ago
npm should write a log and it should tell you where so yeah I guess
Favna
Favna•15mo 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
NoxillioOP•15mo ago
hmmm
Favna
Favna•15mo 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
NoxillioOP•15mo ago
npm i has a verbose flag, gonna try that and see what happens nothing extra from gyp
Favna
Favna•15mo ago
jw can you try using yarn install? possibly you need to install yarn first with npm i -g yarn
Noxillio
NoxillioOP•15mo ago
can try yarn but also is node-gyp supposed to be global
Favna
Favna•15mo ago
it's bundled with npm
Noxillio
NoxillioOP•15mo ago
i dont have it
Favna
Favna•15mo ago
in fact npm i -g node-gyp does jack shit unless you configure npm to use the non bundled version
Noxillio
NoxillioOP•15mo ago
node-gyp is a command right because i cant run it says it doesn't exist
Favna
Favna•15mo ago
yes it's bundled not publicly avail not on the PATH i mean
Noxillio
NoxillioOP•15mo ago
ah that'd be why hm
Favna
Favna•15mo 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
NoxillioOP•15mo ago
Could this be because I installed Node from snap?
Favna
Favna•15mo ago
dunno. Maybe.
Favna
Favna•15mo ago
I recommend using https://volta.sh
Noxillio
NoxillioOP•15mo 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•15mo ago
fact
Noxillio
NoxillioOP•15mo ago
gonna try this again now cause i installed node using volta. it didn't see the one installed by snap either
Favna
Favna•15mo ago
snap sucks
Noxillio
NoxillioOP•15mo ago
and that indeed was the answer npm i was successful this time around why does snap exist Sad
Favna
Favna•15mo ago
you probs had to install build-essential through snap before if that even exists not worth the effort now
Noxillio
NoxillioOP•15mo 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