-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UPDATED: Fix for Apple M1 Chips #1115
Comments
"Urca!!" said in Italian :) |
Hello :) You can fix this issue installing Rosetta terminal to your Visual Studio Code.
|
But you wouldn’t want to do that, so not really a fix. |
@ipv6freely I think it's a bit rich to just say your solution is the best, I think this is a perfectly reasonable fix and doesn't require installing homebrew, which takes space and might not work for some people. |
It’s a workaround, but not a fix. Intentionally bypassing your architecture isn’t a great way to do things. |
I think installing additional software like HomeBrew is not something that many people want either |
You likely won’t need to do that for long. Will depend on how quickly those packages are updated. Either way Rosetta is not a better alternative. |
Can I ask you why Rosetta can't be a better alternative? |
Sure. It’s much better to build for the actual architecture then to translate an instruction set from x86 to arm64. Especially since a newer version of nodejs supports it natively. Rosetta is a workaround (literally - that’s what it exists for) for applications that have not yet migrated to native arm64. Like I said, using Rosetta is a fine workaround but it’s definitely less than ideal and not something I would recommend. Installing the dependencies via homebrew is likely not going to be needed for long. I would actually expect that most of them aren’t necessary to install manually anymore now that nodejs Current has moved from 17.x to 18.0.0 over the last week, but have not tested it yet. |
Thanks for correction. I was too busy 👍🏻 |
I just did a test with a clean build of macOS 12.3.1. 18.0.0 definitely still fixes the issues, however because Here's information about prebuilds not existing for ARM CPU: Automattic/node-canvas#1825 It's unfortunate, and frankly a bit lazy in my opinion, but it is what it is. |
Hey @deemount - Thanks for the help getting my M1 chip up and running! Got a new issue. I have been getting this error in the HashLips engine. There is no pattern I can see in why it stops, layer issues or anything like that. I'm not a savvy coder and can't decode this. Can you help? Thanks, -D Created edition: 601, with DNA: 413ac113a9a1a7e9b12393517bccafbe66420084 |
@deemount you've probably misspelled |
I think you meant me?
This isn't an M1 issue so it's not really meant for this thread. Please either ask in Discord, or open a new Issue ticket. |
Hello and thank you for your help. Sadly the solution suggested above doesnt work for me. After doing this command from Step 3: % arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg I get the following error: Warning: No available formula with the name "pkg-config". Do you have any Idea what I can do? Kinda feel stupid searching hours for solutions but not being able to figure this one. Thank you <3 |
Try taking that one out? |
Thank you. This resolved my issue. I was using an 2020 M1 Macbook Air |
What do you mean by that precisely, sir? I went ahead with the next step but it doesn´t work. |
I mean to remove |
@ipv6freely should we first delete the nod modules folder from the art engine folder? |
@cryptofannatic do it then run |
@bolshoytoster i did that but it's still giving me the same error that i was getting earlier when i tried installing the modules using vscode |
@cryptofannatic that's not an error, it's just a warning. |
@bolshoytoster earlier for some reason when i used to get this error, it wouldn't let me generate the art either and used to give err_dlopen_failed error. I guess it was because i hadn't deleted the node modules folder that's why Thanks for the help btw! |
@WissemEd could you paste the output of running |
@GUNZE314532 you could try restarting your terminal or running Also, you only need to install brew once. |
@bolshoytoster It was same.... Please check the following.🙏 satoshishigeta@Satoshis-MacBook-Pro hashlips_art_engine-main % arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg |
@GUNZE314532 did you try restarting your terminal? |
@bolshoytoster Yes, I did. I deleted the terminal, then made new terminal. |
@GUNZE314532 I noticed at the brew installation it ends at Press RETURN/ENTER to continue or any other key to abort: Did you actually complete the brew installation or did you press another key at that point? |
@bolshoytoster I tried it many times, so I don't remember much, but the first time I did it, I ran another command. I still got an error, so I typed "RETURN" next. |
@GUNZE314532 you gave to press the return/enter key, not literally type 'RETURN' |
Hi @bolshoytoster , It was same... Thanks for your help. satoshishigeta@Kaitlins-iPhone hashlips_art_engine-main % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Press RETURN/ENTER to continue or any other key to abort: |
Hi @bolshoytoster , Thanks for your opinion again. And sorry I was typing actual "RETUR" text. I tried again to just did return key, and It was seems like working to install Homebrew, but it happed another problem. Please check the following. satoshishigeta@Satoshis-MacBook-Pro hashlips_art_engine-main % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" to install Homebrew. Press RETURN/ENTER to continue or any other key to abort:
==> Homebrew has enabled anonymous aggregate formulae and cask analytics. ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: ==> Next steps:
satoshishigeta@Satoshis-MacBook-Pro hashlips_art_engine-main % arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg |
@GUNZE314532 did you try the bit in "Next steps": Warning: /opt/homebrew/bin is not in your PATH.
Instructions on how to configure your shell for Homebrew
can be found in the 'Next steps' section below.
...
==> Next steps:
Run these two commands in your terminal to add Homebrew to your PATH:
(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> /Users/satoshishigeta/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)" |
Hi, @bolshoytoster Like below? But It didn't work... Warning: /opt/homebrew/bin is not in your PATH. ==> Homebrew has enabled anonymous aggregate formulae and cask analytics. ==> Homebrew is run entirely by unpaid volunteers. Please consider donating: ==> Next steps:
satoshishigeta@Satoshis-MacBook-Pro hashlips_art_engine-main % |
@GUNZE314532 you're meant to run:
then
|
@bolshoytoster Thank you! How about next? ==> Next steps:
satoshishigeta@Satoshis-MacBook-Pro hashlips_art_engine-main % |
@GUNZE314532 you should be able to run |
Hi @bolshoytoster It was error again... The following is very very long when I copy all the text, so I copy-pasted the text from the middle. Please check. If you need to have jpeg first in your PATH, run: For compilers to find jpeg you may need to set: For pkg-config to find jpeg you may need to set: If you need to have jpeg first in your PATH, run: For compilers to find jpeg you may need to set: For pkg-config to find jpeg you may need to set: npm ERR! A complete log of this run can be found in: /Users/satoshishigeta/.npm/_logs/2023-04-28T07_03_48_041Z-debug-0.log |
@GUNZE314532 you could try the suggestions: symlinked into /opt/homebrew,
because it conflicts with jpeg-turbo.
If you need to have jpeg first in your PATH, run:
echo 'export PATH="/opt/homebrew/opt/jpeg/bin:$PATH"' >> ~/.zshrc
For compilers to find jpeg you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/jpeg/lib"
export CPPFLAGS="-I/opt/homebrew/opt/jpeg/include"
For pkg-config to find jpeg you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/jpeg/lib/pkgconfig" ( |
Hi, @bolshoytoster Thanks for your many help. How about below? npm ERR! A complete log of this run can be found in: /Users/satoshishigeta/.npm/_logs/2023-04-28T07_03_48_041Z-debug-0.log
satoshishigeta@Satoshis-MBP hashlips_art_engine-main % export PATH="/opt/homebrew/opt/jpeg/bin:$PATH", export LDFLAGS="-L/opt/homebrew/opt/jpeg/lib", export CPPFLAGS="-I/opt/homebrew/opt/jpeg/include", export PKG_CONFIG_PATH="/opt/homebrew/opt/jpeg/lib/pkgconfig" Usage: npm install install all the dependencies in your project All commands:
Specify configs in the ini-formatted file: More configuration info: npm help config [email protected] /usr/local/lib/node_modules/npm npm ERR! A complete log of this run can be found in: /Users/satoshishigeta/.npm/_logs/2023-04-30T00_01_14_303Z-debug-0.log |
@GUNZE314532 this comment suggests adding "resolutions": {
"nan": "github:jkleinsc/nan#remove_accessor_signature"
}, between lines 30-31 in hashlips_art_engine/package.json Lines 30 to 31 in d8ee279
|
Hi @bolshoytoster Correct below? |
@GUNZE314532 try changing the |
@bolshoytoster Like below?? |
@GUNZE314532 no, change the |
@bolshoytoster Like this? |
@GUNZE314532 yes. |
@bolshoytoster Then, npm install next? |
@GUNZE314532 yes. |
@bolshoytoster It was same error....(⌇ຶД⌇ຶ) |
It's 2024 and this is still the solution for me |
This updates #812 which is no longer the recommended method. Downgrading software is never a good idea, especially to a version so old as v14. There may be bugs, or potentially very unsafe code and security vulnerabilities.
The correct method is as follows:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
to install Homebrew.arch -arm64 brew install pkg-config cairo pango jpeg giflib librsvg
npm install
@HashLips please go ahead and close/lock #812 since it's no longer relevant.
The text was updated successfully, but these errors were encountered: