Closed cwilling closed 2 years ago
I know it works with yarn, npm probably isn't happy because of how lerna is setup.
This only matters for development, not when installing packages from npm
OK thanks - I'm not very familiar with yarn but running yarn build
seemed to finish without incident and some of the examples work. However they seem to be looking in the wrong directory for images e.g.`
(node:118435) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open '/home/chris/src/node-elgato-stream-deck/packages/node/src/__tests__/fixtures/mosaic.png'
In that particular case, changing the path from path.resolve(__dirname, '../src/__tests__/fixtures/mosaic.png')
to path.resolve(__dirname, '../../../fixtures/mosaic.png')
enabled images to load and be displayed. Is that possibly because some additional yarn command is required to move images into the correct directory?
The reason to know is that I may want to build on other architectures not supported by prebuilt npm packages. Also, I just like to know :)
I have a feeling that I never did get around to updating some of the examples when restructuring files, so it is very possible that some are a bit broken.
The reason to know is that I may want to build on other architectures not supported by prebuilt npm packages. Also, I just like to know :)
Nothing in this library is architecture specific. Some of the dependencies (node-hid
and @julusian/jpeg-turbo
) are native libraries and where you might need to focus. Do you have any idea what architectures you might be needing? I believe they both already support the common ones
I have a feeling that I never did get around to updating some of the examples when restructuring files, so it is very possible that some are a bit broken.
The reason to know is that I may want to build on other architectures not supported by prebuilt npm packages. Also, I just like to know :)
Nothing in this library is architecture specific. Some of the dependencies (node-hid
and @julusian/jpeg-turbo
) are native libraries and where you might need to focus. Do you have any idea what architectures you might be needing? I believe they both already support the common ones
Aiming to eventually run on anything including RASPI armhf & arm64 and thought I'd need to rebuild for node-hid at least.
I just built on armhf RASPI and it seemed to go OK. Rapid-fill & brightness examples run fine but bit of a problem with device-detection which is stuck at:
pi@pi4b2:~/node-elgato-stream-deck/packages/node/examples $ node device-detection.js
{ model: 'xl', path: '/dev/hidraw0', serialNumber: 'CL29K1A00610' }
Serial: Promise { <pending> }
Firmware: Promise { <pending> }
The same device attached to a regular x86_64 machine gave a full report without stalling like that.
I'll look at it some more tomorrow (it's late here now).
That output looks mostly correct, other than it wasnt updated for the api changes to handle those functions becoming promises.
yeah node-hid doesnt look to have a linux-arm64 build currently, but also if you have the correct build tools installed it will happily build it when being installed as a dependency. Ive opened an issue to ask for it, as I too do use node-hid on arm64, but didnt notice the lack of prebuilt binary.
I have tested and updated the examples
Thanks. I can confirm that the examples (including device-detection.js) now work as expected on RASPI - both armhf and arm64.
npm install fails at postinstall (as below). I'm using nodejs 12 but same problem with 14, 16 & 18. Any tips to fix?
npm install says:
The debug log says: