Pre-built binaries not installable for @sapphire/[email protected] & build failing
Hi, I'm opening this thread for a contributor who is encountering issues attempting to install Sapphire
The full logs are found at: https://gist.github.com/Southpaw1496/21a4679c77a48baa063aad67680443d4
A highlight is that
│ node-pre-gyp http GET https://github.com/sapphiredev/type/releases/download/v2.4.0/type-v2.4.0-node-v108-darwin-arm64-unknown-unknown.tar.gz
the build step seems to not be able to resolve the last two parts of their machine information
Along with that, when it falls back to the manual build step it's showing │ ModuleNotFoundError: No module named 'distutils'
Has anyone run into this before and may know what a fix for it is?
Other information:
They have Python and OpenSSL and Make already,
Running an M1 MacBook on Sonoma 14.0 with PNPM 8.10.0
They tried Node 21, Node 20, and Node 18 but it didn't seem to do anythingGist
AnswerOverflow crash log
AnswerOverflow crash log. GitHub Gist: instantly share code, notes, and snippets.
Solution:Jump to solution
Make sure you are up-to-date using the latest @sapphire/type. Python 3.12 broke some stuff in node-gyp but that’s been fixed in @sapphire/type 3.4.1. Also make that your lock file is regerenated and only pulls in node-gyp v10 or higher (the transitive dependency should be node-gyp@latest).
4 Replies
Solution
Make sure you are up-to-date using the latest @sapphire/type. Python 3.12 broke some stuff in node-gyp but that’s been fixed in @sapphire/type 3.4.1. Also make that your lock file is regerenated and only pulls in node-gyp v10 or higher (the transitive dependency should be node-gyp@latest).
npm
npm doesn't have anything to update transitive dependencies so you'll have to provide
overrides
.
In your package.json
:
Then run npm install
. You can verify the change by checking your package-lock.json
Yarn v1
Yarn v1 (deprecated, recommend updating to v4 (see /tag query:yarnv4
) does not have a way to update transitive dependencies so a similar strategy is required as npm:
In your package.json
:
Then run yarn install
. You can verify the change by checking your yarn.lock
Yarn v4
Yarn v4 can update transitive dependencies so run the command:
pnpm
pnpm can also update transitive dependencies so run the command:
@Rhys checking in if you got around this? So we can mark it as answered.
Hey I haven't yet sorry about that - I'll see if this fixes it thank you for the help