Noxillio - sapphiretype is impossible to install...

@sapphire/type is impossible to install on Apple Silicon systems.
75 Replies
Noxillio
NoxillioOP3y ago
When attempting to install it an error occurs because a tarball has not been released for arm64, resulting in a 404 when attempting to grab one. https://hastebin.com/aniducekob.coffeescript
Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Photon
Photon3y ago
xcode is updated? Tbh I never faced anything like this and I use apple silicon chip too
Noxillio
NoxillioOP3y ago
Are you able to install @sapphire/type? And are you using M1 or M2? I'm on M2 Don't have it, don't need it, don't want it, don't use it All other Sapphire packages install without issue
Photon
Photon3y ago
M2 it’s
Favna
Favna3y ago
I'm on M1 and I can install it just fine. Make sure you have build tools installed. And not using Node 19
Noxillio
NoxillioOP3y ago
Nope I'm on LTS How can I grab this without having to install Xcode in full because it's a waste of storage I was prompted to install Git command line tools but not Xcode tools
Favna
Favna3y ago
xcode-select --install
Noxillio
NoxillioOP3y ago
xcode-select: error: command line tools are already installed, use "Software Update" to install updates Only available updates are macOS and Safari
Favna
Favna3y ago
What does this give?
Noxillio
NoxillioOP3y ago
I'm curious to know how you guys are able to install it despite no arm64 version existing? Is it using x64 instead via Rosetta? 2395 One below yours
Favna
Favna3y ago
In that case, sec Grab the xcode cli tools from https://developer.apple.com/download/all/
Noxillio
NoxillioOP3y ago
This one here?
Favna
Favna3y ago
Yes
Noxillio
NoxillioOP3y ago
Same thing, also still says 2395. Let me try relaunching my terminal Still 2395. Will try again and then reboot if same issue. Which macOS version are you on btw @Favna
Favna
Favna3y ago
Ventura
Favna
Favna3y ago
Noxillio
NoxillioOP3y ago
Still 2395. Same issue after reboot I am on Monterey and prefer not to update as they have not fixed the controller issues present since beta. Our OS difference may be the cause of that 2395/6 difference?
Favna
Favna3y ago
Possibly Idk what controller issue you're referring to but sure I guess
Noxillio
NoxillioOP3y ago
Switch Pro controller buttons are all messed up, my DualSense hardly worked at all. OpenEmu in particular has issues with Ventura that aren't present on Monterey, per their GitHub
Favna
Favna3y ago
Anyway if xcode-select is installed and updated, Node is v18 and brew packages are all updated then I dont know
Noxillio
NoxillioOP3y ago
I'm going to try installing Rosetta rq
Favna
Favna3y ago
It is worth running brew update to check if anything can be updated I guess but it shouldnt really matter unless they are ancient versions
Noxillio
NoxillioOP3y ago
Rosetta didn't work Could it have anything to do with the exact binary of Node.js that I installed? There are different ones for Silicon and otherwise I really don't understand how when you try to install it, it doesn't try to use the URL that mine is Because if it was it wouldn't get anything
Favna
Favna3y ago
I have it installed through volta.. https://volta.sh
Favna
Favna3y ago
I assume that grabs it from the Nodejs pages
Favna
Favna3y ago
But it certainly works
Noxillio
NoxillioOP3y ago
Hmm I've never heard of it before Did it install the x64 build or ARM64
Favna
Favna3y ago
I mean the url on the GH rpeo is auto resolved but no there are no prebuilts for Node 18 stuff yet either I think
Favna
Favna3y ago
Locally it builds fine for me anyway
Noxillio
NoxillioOP3y ago
I looked at the packages in the release, the only difference is the arm64 bit in mine
Favna
Favna3y ago
Favna
Favna3y ago
If you have NodeJS x86 installed that'd be a big problem haha
Noxillio
NoxillioOP3y ago
Noxillio
NoxillioOP3y ago
You said you're building it yeah? Mine just hangs up trying to download a nonexistent tarball from the GitHub release
Favna
Favna3y ago
Yes I ran yarn build in the repo itself
Noxillio
NoxillioOP3y ago
Yeah I'm just trying to install it with npm npm i @sapphire/type Could all this be fixed if an arm64 build was added to the release
Favna
Favna3y ago
Installing works fine too
Noxillio
NoxillioOP3y ago
yf?
Favna
Favna3y ago
yarn --immutable
Noxillio
NoxillioOP3y ago
idk what that is but like.... the error I attached above is what happens when installing with just npm. It on its own attempts to grab a file that doesn't exist in the release - and I can see that when you build it on your end, it generates an arm64 version that doesn't exist in the release either So it really just seems to me like the problem is an arm64 build isn't in the GitHub release which is what is being fetched No other reason why it would give a 404
Favna
Favna3y ago
I mean the last time prebuilts were published was in april before we even did arm64 prebuilds so I guess I can try it That said You should never fully rely on prebuilds It's nice to have But it shouldnt be a requirement
Noxillio
NoxillioOP3y ago
I suppose I can take this as a sign that I should start building things like this - but if prebuilds are available for everything else then it would make sense for arm64 to be available :/ especially since all other @sapphire/ modules work appreciate you fam Now if only I actually knew how to build it - that's the whole reason I prefer prebuilds lol
Favna
Favna3y ago
Because type is the only one that uses C++ code
Noxillio
NoxillioOP3y ago
Ahh I see
Favna
Favna3y ago
Same as libs like zlib-sync, bufferutil, canvas stuff etc
Noxillio
NoxillioOP3y ago
Yeah I've never built things by myself Is it easy?
Favna
Favna3y ago
I mean in the type repo you just run yarn build And when npm installing the build is automatic It should fall back when the url 404s
Noxillio
NoxillioOP3y ago
fall back? how do you mean
Favna
Favna3y ago
"install": "node-pre-gyp install --fallback-to-build",
"install": "node-pre-gyp install --fallback-to-build",
That gets called when installing with npm/yarn It falls back to building with your own build tools Which is why xcode-select is impotant
Noxillio
NoxillioOP3y ago
Does that only happen if I've cloned it or already built it locally or..?
Favna
Favna3y ago
That gets called when installing with npm/yarn
Noxillio
NoxillioOP3y ago
Doesn't happen when I install it with npm derp
Favna
Favna3y ago
It definitely does, something else just errors
Noxillio
NoxillioOP3y ago
The URL 404s, so as you said it should fall back, which it doesn't. Unless you're referring to all that other stuff in the error log I sent
Favna
Favna3y ago
No lock file, no node_modules, cleared cache, using npm instead of yarn
Noxillio
NoxillioOP3y ago
Oh hey it does say it's attempting to fall back
Favna
Favna3y ago
Yes, obviously omegalul I did say "after the url 404s"
Noxillio
NoxillioOP3y ago
I stopped reading the error after the 404 ngl The rest is shit I don't understand so I kinda didn't bother
Noxillio
NoxillioOP3y ago
I'm assuming this chunk here is the part I should be concerned with?
Favna
Favna3y ago
Yes except that you cut off the actual error there 🤡
Noxillio
NoxillioOP3y ago
I thought that was it
Favna
Favna3y ago
I can see at least 1 npm ERR line below
Noxillio
NoxillioOP3y ago
Noxillio
NoxillioOP3y ago
Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
Noxillio
NoxillioOP3y ago
It did generate a much more verbose log file as well: https://hastebin.com/gevivuyoce.apache
Hastebin: Send and Save Text or Code Snippets for Free | Toptal®
Hastebin is a free web-based pastebin service for storing and sharing text and code snippets with anyone. Get started now.
kyra
kyra3y ago
Hi, @Noxillio, followup I have been trying to update /type to support Node.js v19
kyra
kyra3y ago
However, that's currently not possible, you see, we're using nan, and at the current time, it does not support Node.js v19
kyra
kyra3y ago
We have also tried to switch to node-addon-api, but it seems to have limitations (no way to check if an object is a proxy, plus Promise being so opaque, we cannot read anything from it) Likewise, napi-rs does not seem to provide utilities for proxies either. Their Promise struct has a value field, but it's not exposed as public, and there are no methods exposing it in any way The only way to support v19 right now, would be to use v8.h directly
Favna
Favna3y ago
Adding to that, after the PR we should still have prebuilts for Node 18 for MacOS ARM64 but no Node 19
Noxillio
NoxillioOP3y ago
That's alright, I'm not using 19 anyway. I'm on LTS (18) I tend to only use LTS when installing Node due to situations like these where there are compatibility issues involved Appreciate the update from both of you <:1_thankyou:963877812895354981>
Favna
Favna3y ago
Okay so apparently github workflows straight up doesnt do MacOS ARM yet... https://github.com/actions/runner-images/issues/2187 And I totally missed that in fact DiscordJS Opus also doesn't have ARM prebuilts and their latest release action also failed because of conflicting names so it's kind of a false positive failure.
GitHub
Support for VMs on Apple M1 · Issue #2187 · actions/runner-images
Is there any plan to release VMs in Apple M1 hardware to run GitHub Actions?
Favna
Favna3y ago
So like You'll somehow have to fix your local build tools after all
Noxillio
NoxillioOP3y ago
Ouch. Alright Based on what you told me though it seems plenty easy enough to build myself so I'll give it a shot. Thanks a bunch for looking into this for me praying
Want results from more Discord servers?
Add your server