Pre-built binaries not installable for @sapphire/type@2.4.0 & 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 anything
Gist
AnswerOverflow crash log
AnswerOverflow crash log. GitHub Gist: instantly share code, notes, and snippets.
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).
Jump to solution
4 Replies
Solution
Favna
Favna7mo ago
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).
Spinel
Spinel7mo ago
npm npm doesn't have anything to update transitive dependencies so you'll have to provide overrides. In your package.json:
{
"overrides": {
"package-name-here": "version"
}
}
{
"overrides": {
"package-name-here": "version"
}
}
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:
{
"resolutions": {
"package-name-here": "version"
}
}
{
"resolutions": {
"package-name-here": "version"
}
}
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:
yarn up -R package-name-here
yarn up -R package-name-here
pnpm pnpm can also update transitive dependencies so run the command:
pnpm --recursive update package-name-here@version
pnpm --recursive update package-name-here@version
Favna
Favna7mo ago
@Rhys checking in if you got around this? So we can mark it as answered.
Rhys
Rhys7mo ago
Hey I haven't yet sorry about that - I'll see if this fixes it thank you for the help