Noxillio - sapphiretype is impossible to install...
@sapphire/type is impossible to install on Apple Silicon systems.
75 Replies
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.
xcode is updated?
Tbh I never faced anything like this and I use apple silicon chip too
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
M2 it’s
I'm on M1 and I can install it just fine. Make sure you have build tools installed.
And not using Node 19
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
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
Only available updates are macOS and SafariWhat does this give?
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
In that case, sec
Grab the xcode cli tools from https://developer.apple.com/download/all/
This one here?
Yes
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
Ventura
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?
Possibly
Idk what controller issue you're referring to but sure I guess
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
Anyway if xcode-select is installed and updated, Node is v18 and brew packages are all updated then I dont know
I'm going to try installing Rosetta rq
It is worth running
brew update
to check if anything can be updated I guess but it shouldnt really matter unless they are ancient versionsRosetta 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
I have it installed through volta.. https://volta.sh
Volta - The Hassle-Free JavaScript Tool Manager
Volta: Start your engines.
I assume that grabs it from the Nodejs pages
But it certainly works
Hmm
I've never heard of it before
Did it install the x64 build or ARM64
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
Locally it builds fine for me anyway
I looked at the packages in the release, the only difference is the
arm64
bit in mineIf you have NodeJS x86 installed that'd be a big problem haha
You said you're building it yeah?
Mine just hangs up trying to download a nonexistent tarball from the GitHub release
Yes I ran
yarn build
in the repo itselfYeah 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 releaseInstalling works fine too
yf
?yarn --immutable
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
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
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
Because type is the only one that uses C++ code
Ahh I see
Same as libs like zlib-sync, bufferutil, canvas stuff etc
Yeah I've never built things by myself
Is it easy?
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 404sfall back? how do you mean
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
Does that only happen if I've cloned it or already built it locally or..?
That gets called when installing with npm/yarn
Doesn't happen when I install it with npm
It definitely does, something else just errors
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
No lock file, no node_modules, cleared cache, using npm instead of yarn
Oh hey it does say it's attempting to fall back
Yes, obviously I did say "after the url 404s"
I stopped reading the error after the 404 ngl
The rest is shit I don't understand so I kinda didn't bother
I'm assuming this chunk here is the part I should be concerned with?
Yes except that you cut off the actual error there 🤡
I thought that was it
I can see at least 1
npm ERR
line belowjust gonna repost 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.
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.
Hi, @Noxillio, followup
I have been trying to update /type to support Node.js v19
However, that's currently not possible, you see, we're using
nan
, and at the current time, it does not support Node.js v19We 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 directlyAdding to that, after the PR we should still have prebuilts for Node 18 for MacOS ARM64 but no Node 19
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>
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?
So like
You'll somehow have to fix your local build tools after all
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