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