Error: AWS CRT binary not present in any of the following locations
zhex900 opened this issue · 1 comments
zhex900 commented
Hi,
I am trying to get aws-iot-device-sdk-v2
to work with electron. After I have added the package. Run my code. I get this error.
> electron-react-typescript@1.0.0 start:electron /Users/jake/Code/electron/electron-typescript-react
> electron .
App threw an error during load
Error: AWS CRT binary not present in any of the following locations:
/Users/jake/Code/electron/bin/native/aws-crt-nodejs
/Users/jake/Code/electron/bin/darwin-x64/aws-crt-nodejs
at Object../node_modules/aws-crt/dist/native/binding.js (/Users/jake/Code/electron/electron-typescript-react/dist/main.js:1498:11)
at __webpack_require__ (/Users/jake/Code/electron/electron-typescript-react/dist/main.js:20:30)
If I change the electron webpack config to
node: {
__dirname: true
},
App threw an error during load
Error: Cannot find module '/Users/jake/Code/electron/electron-typescript-react/node_modules/
aws-crt/dist/bin/darwin-x64/aws-crt-nodejs'
/Users/jake/Code/electron/electron-typescript-react/node_modules/ aws-crt/dist/bin/darwin-x64/aws-crt-nodejs.node
Is a valid path.
I guess it is something to do with .node
Any ideas?
I have added this to electron-typescript-react/webpack/electron.webpack.js
{
test: /\.node$/,
loader: "node-loader",
},
This makes no difference.