-
Notifications
You must be signed in to change notification settings - Fork 84
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
Error installing x509: error [email protected] install: node-gyp rebuild
on macOS
#86
Comments
Also fails with the same error with the following. |
For other people who might be in this situation and need a fix soon because this code may be in production, there is a library that offers the same functionality: https://github.com/fidm/x509. We needed a fix ASAP, so we started using it, it is completely Javascript based, so that eliminates the node-gyp disgusting problem with Node 12-13, and not a lot of work is required to adapt your current code to it (the structure of the JSON returned is almost the same). We have already implemented it and working quite well. If you are in this situation, while you wait for a fix of this amazing library, give it a try. |
I don't think this bug is MacOS specific, similar issue appears in Ubuntu. When running NodeJS 12 and above the below Dockerfile will fail, here is the simplest possible container that I could think of that triggers the error: FROM ubuntu:20.04
RUN apt-get update && \
apt-get install curl -y
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs build-essential
RUN mkdir -p /root/test
WORKDIR /root/test
RUN npm init -y
RUN npm install node-gyp
RUN npm install x509
CMD ["/bin/bash"] The error does not occur at the For the purpose of this error being easier to Google the main error seems to be these lines:
With the end section having looking like this:
|
x509 fails to compile / install with NPM.
NPM version: 6.13.1
Node version: v13.3.0
MacOS version: macOS Catalina 10.15.1 (19B88)
Error output:
Any info you might need, please don't hesitate to ask.
The text was updated successfully, but these errors were encountered: