-
Notifications
You must be signed in to change notification settings - Fork 516
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
mac m1 bcrypt@5.0.1 install: node-pre-gyp install --fallback-to-build
#868
Comments
We do not have pre-compiled version for m1 so you will need to setup Python and Xcode to compile it from source. Our CI doesn't have M1 and I do not have a M1 Mac as well. So this will be the state for quite some time. |
Hm, isn't this because the arm64 version is not included in the latest release? (5.0.0 has it) Maybe try 5.0.0 and see if it resolves the problem. @recrsn Is there a reason for the absence of arm64 in the latest release? |
I'm getting a similar error, tried using 5.0.0 but still not working,
How can I do this? |
@JEK58 We do not have macos-arm64 support on 5.0.0 It has experimental linux-arm64 binaries Until CIs have arm64 offerings, I'll need to procure an ARM mac to build them. |
I have installed both python2 and C++. If I could help you guys somehow to find out the issue together, you can count on me. I mean arm64 is not something that's going to be gone, it's the future, that's why I think everyone should take it more seriously to get packages updated... to build it from source, it requires python, which is not available inside the docker image in my case |
Not sure if I'm not realizing and one of those could be used for mac, or there is no instructions for mac. |
@Harthor you only need XCode command line tools |
Downloaded it, still getting same error, should I do something else besides installing it? |
Are you able to run make and g++? |
The error happens when using yarn to install a whole bunch of dependencies, amongst them is included bcrypt, I'm not sure where you mean I should run make. [4/4] 🔨 Building fresh packages... |
Looks like it's a different module It's a different module than |
Yeah i knew, but I thought the problem was similar, no idea how to fix it |
I had a very similar error, but actually with bcrypt and not bcrypto. This thread appears very high on google, so here is what worked for me: My problem was in node-gyp: https://github.com/nodejs/node-gyp/blob/master/macOS_Catalina.md . I had to run these commands to check and reset the XCode path:
If the path changed, you know it needed the reset. I also had to also run I think I found this via https://medium.com/@mrjohnkilonzi/how-to-resolve-no-xcode-or-clt-version-detected-d0cf2b10a750 |
I have the same issue even installing xcode command line tools didn't helped me.
|
This didn't work for me though. |
Unable to install bcrypt (5.0.1) on M1 Pro
|
@recrsn @Cucak if you guys send me a link with instructions, I'll download the source and compile it for a mac: amd64... i need it too but I can't figure out how to compile the source. don't send the link you pasted above, that thing doesn't tell anything about compiling on a mac and I can't find a makefile so that's the issue for me. send the instructions and I'll compile and create a pr today. |
I'm stuck as well with bcrypt on arm64...hope something will happen fast... |
Hi, I'm having this same issue. Could you explain how to 'compile from source' once I have python 3, Xcode installed and g++? |
@QuentinGuyot-epitech @santi-g-s I gave up on waiting, they never sent me anything and I couldn't get it to work, I ended up using the JavaScript version of this library bcryptjs and it works fine. they also have TS support so I just removed this library. |
Can’t send it because it’s not my private project. Anyone with Mac M1 can
try to use this package and it’s gonna fail. Also we are not always in the
situation to choose npm package if we are working for some company and we
are not the one to choose the package.
…On Tue, 7 Dec 2021 at 00:11, Isaac Ewing ***@***.***> wrote:
@QuentinGuyot-epitech <https://github.com/QuentinGuyot-epitech> @santi-g-s
<https://github.com/santi-g-s> I gave up on waiting, they never sent me
anything and I couldn't get it to work, I ended up using the JavaScript
version of this library bcryptjs <https://www.npmjs.com/package/bcryptjs>
and it works fine. they also have TS support so I just removed this library.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#868 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AETBKX7OTGKEAAQD4XQJ7G3UPU7KLANCNFSM43V4UZ3A>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Yeah but that package hasn't been updated for a long while. Plus it's slower than this package. |
Hello guys, is any news about bcrypt image for M1 Mac ? |
Make sure you use the right version of node. something like that |
Escaped characters in project directory path will break install on M1 machinesI am on a Mac OS Montery 12.0.1 with an M1 Pro Chip. I encountered a similar error as above when running I identified this error only occurred if a parent directory had an "&" or " " (seems like any escaped chars) in the path. Failing install replication steps
Successful install replication steps
**There are likely other characters that will break the install |
…om source for `arm64` (Apple Silicon M1) as [prebuilts don't exist](kelektiv/node.bcrypt.js#868)
As a workaround I finally use UTM to have a linux vm working on m1 then use docker inside it to run my project. No more error and all run as expected. |
@QuentinGuyot-epitech Does your project directory path contain escaped characters? |
Can confirm @joelcolucci 's Solution is working perfectly. You need to make sure that your node project does not have any spaces or special characters in the path. I had -= in my path no spaces however but moving the project to a path with none of those characters helped. I think an update to the readme would be useful. |
Do you find any solution? |
@vijayverma-kvp Yes, the solution is that you need to check if your path to your project has any special characters like spaces or anything that would need to be escaped. In my case it was '=' character once I moved the project to a path where there are no spaces or special characters in the path it works perfectly fine. However in the case of the quoted answer check what is the return of running |
I got my hands on a m1 mac and now we have arm64 builds |
=> ERROR [dependencies 3/5] RUN npm install --production=false 14.4s
I am using mac m1 and basically tried reinstalling whole my setup, I tried different node packages as well.
I need to know if this package should not have problem with mac m1 cpu?
The text was updated successfully, but these errors were encountered: