Closed lmk123 closed 2 years ago
I have confirmed that uihook-napi@1.1.0 works fine with macOS arm64.
Thank you for your work.
@lmk123 Have you done anything special?
I'm still getting Error: No native build was found for platform=darwin arch=arm64 runtime=electron abi=103 uv=1 armv=8 libc=glibc node=16.13.2 electron=18.2.3 webpack=true
@melMass try add this in your webpack config:
externals: {
'uiohook-napi': 'commonjs uiohook-napi'
},
Yes!! Thanks a lot @lmk123
I still have this problem even though adding it to externals : const configuration: webpack.Configuration = { externals: [ ...Object.keys( externals || { 'uiohook-napi': 'commonjs uiohook-napi', } ), ],
...
If anyone using vite and having difficulties making uiohook-nap
work, you can add it to rollupOptions
in your vite.config.js
like below:
...
...
rollupOptions: {
external: [
'electron',
'electron-devtools-installer',
'uiohook-napi',
...builtinModules.flatMap((p) => [p, `node:${p}`]),
],
output: {
entryFileNames: '[name].cjs',
},
},
...
...
When used on a Macbook M1, the following error is reported:
I hope you can provide the prebuild for macOS arm64, thanks.