You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mobile OS and version: iOS Simulator Version 11.6 (921.9.1)
Development Node.js: v10.15.1
Development platform: Darwin 19.5.0 Darwin Kernel Version 19.5.0: RELEASE_X86_64 x86_64
Has anyone else had any luck utilizing a .node nodejs addon with nodejs-mobile-react-native? Attempting to require the .node file appears to crash the app.
The text was updated successfully, but these errors were encountered:
coreyphillips
changed the title
Receiving an error when attempting to require a nodejs addon
Attempting to require a nodejs addon causes the app to crash
Aug 14, 2020
It turns out the errors I'm receiving are the following:
iOS: Error: dlopen(/private/var/containers/Bundle/Application/ED3FDD4B-524A-4C81-9489-AA3033180524/nodeAddonAttempt.app/nodejs-project/rgb_node.node, 0x0001): could not use '/private/var/containers/Bundle/Application/ED3FDD4B-524A-4C81-9489-AA3033180524/nodeAddonAttempt.app/nodejs-project/rgb_node.node' because it is not a compatible arch
Android: Error: dlopen failed: \"/data/data/com.nodeAddonAttempt/files/nodejs-project/rgb_node.node\" has bad ELF magic: cffaedfe
Possibly an issue with how the nodejs addon is built? If so, how would I include the mobile architechtures into the addon for use in nodejs-mobile-react-native?
Hi @coreyphillips ,
This looks like the native module is not built for Android and/or iOS (the .node file here.
The react-native-module has a way to rebuild native modules when the .gyp and source files are inside node_modules when you are building the application, by setting the right environment variables to use the nodejs-mobile headers, use nodejs-mobile-gyp, set the right architectures and so on.
Uh oh!
There was an error while loading. Please reload this page.
Has anyone else had any luck utilizing a
.node
nodejs addon with nodejs-mobile-react-native? Attempting to require the.node
file appears to crash the app.The text was updated successfully, but these errors were encountered: