-
Notifications
You must be signed in to change notification settings - Fork 114
gyp: name 'openssl_fips' is not defined
- node-gyp
error
#163
Comments
Related to #141 |
Can you think of any workaround? |
I don't know @phhoef 🙇 |
FWIW I worked through a similar issue while setting up builds in CI for windows. After googling around I found that the specific error you mentioned relating to |
@todbot what It looks like But I can see that @phhoef was reproducing with In terms of workarounds I see,
Or modifying |
@MadLittleMods @phhoef seem like this is not exclusively an M1 issue. I get the same error on intel core i5 running node16`
|
No, I didn't found a solution for that problem. |
Thanks for your reply. Do you mind sharing your code so there is an
alternative on this thread.
|
The code is part of a bigger application, but I am trying to post the relevant code snips. I've also a button where the user can manually trigger a refresh of the serial port. export const getSerialports = () => async (dispatch) =>
{
const ports = await serialport.list();
dispatch({
type: SerialportTypeKeys.GET_SERIAL_PORTS,
ports
});
} redux reducer: switch (action.type) {
case SerialportTypeKeys.GET_SERIAL_PORTS:
if (action.ports.length > 0) {
const selectedPort =
state.selectedPort === null
? action.ports[0]
: action.ports.find((p) => p.path === state.selectedPort.path);
return { ...state, ports: action.ports, selectedPort };
} else return { ...state, ports: action.ports, selectedPort: null };
} In my const store = configureStore();
const boundActions = bindActionCreators({ getSerialports }, store.dispatch);
let lastPorts = [];
const checkSerialPorts = async () => {
const ports = await SerialPort.list();
if (!equalPorts(lastPorts, ports)) boundActions.getSerialports();
lastPorts = ports;
setTimeout(checkSerialPorts, 2000);
};
checkSerialPorts(); I need to make this binding to the store, as I want to call the redux action. I also needed a proper equals check to determine if an update of the available ports is necessary. Otherwise I would flood my redux store with unnecessary changes ... export const equalPorts = (a: IPort[], b: IPort[]) => {
return (
Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, index) => val.path === b[index].path)
);
}; Hope this helps 🙂 |
Thank you very much
…On Fri, Mar 3, 2023 at 11:06 AM ph ***@***.***> wrote:
The code is part of a bigger application, but I am trying to post the
relevant code snips.
I am using redux as state container.
I've also a button where the user can manually trigger a refresh of the
serial port.
So, the redux part was already in place, I've just added the timer as
workaround.
redux action:
export const getSerialports = () => async (dispatch) =>
{
const ports = await serialport.list();
dispatch({
type: SerialportTypeKeys.GET_SERIAL_PORTS,
ports
});
}
redux reducer:
The reducer also preselects the first found serial port, if the user
hasn't select one...
switch (action.type) {
case SerialportTypeKeys.GET_SERIAL_PORTS:
if (action.ports.length > 0) {
const selectedPort =
state.selectedPort === null
? action.ports[0]
: action.ports.find((p) => p.path === state.selectedPort.path);
return { ...state, ports: action.ports, selectedPort };
} else return { ...state, ports: action.ports, selectedPort: null };
}
In my index.tsx I am calling the timer:
const store = configureStore();
const boundActions = bindActionCreators({ getSerialports }, store.dispatch);
let lastPorts = [];
const checkSerialPorts = async () => {
const ports = await SerialPort.list();
if (!equalPorts(lastPorts, ports)) boundActions.getSerialports();
lastPorts = ports;
setTimeout(checkSerialPorts, 2000);
};
checkSerialPorts();
I need to make this binding to the store, as I want to call the redux
action.
You probably can reduce the complexity and only use the checkSerialPorts()
method.
I also needed a proper equals check to determine if an update of the
available ports is necessary. Otherwise I would flood my redux store with
unnecessary changes ...
export const equalPorts = (a: IPort[], b: IPort[]) => {
return (
Array.isArray(a) &&
Array.isArray(b) &&
a.length === b.length &&
a.every((val, index) => val.path === b[index].path)
);
};
Hope this helps 🙂
—
Reply to this email directly, view it on GitHub
<#163 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABVPVRUTWUZNGHZPIRB4VBTW2HGDFANCNFSM5PX76JUA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
gyp: name 'openssl_fips' is not defined
- node-gyp
error
Unfortunately after trying the
|
Sony, not as far as I remember. |
I am trying to re-compile
usb-detection
on an Apple M1 Mac.Unfortunately, I do get a error
Anybody can think how to workaround this?
The text was updated successfully, but these errors were encountered: