Level / leveldown-mobile

This project has been abandoned.
MIT License
27 stars 8 forks source link

iOS wrong architecture #16

Closed MagicLizi closed 5 years ago

MagicLizi commented 6 years ago

I use leveldown-mobile with nodejs-mobile-react-native on iOS when I require(leveldown.node) I get the issue,please help me

/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node
LevelUPError: Failed to require LevelDOWN (dlopen(/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node, 1): no suitable image found.  Did find:
    /private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node: mach-o, but wrong architecture
    /private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/leveldown-mobile/build/Release/leveldown.node: mach-o, but wrong architecture). Try `npm install leveldown` if it's missing
   at requireError (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/leveldown.js:37:3)
   at getLevelDOWN (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/leveldown.js:31:5)
   at LevelUP.prototype.open (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:112:3)
   at LevelUP (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:84:3)
   at LevelUP (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/levelup/lib/levelup.js:45:37)
   at LevelDatastore (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/datastore-level/src/index.js:27:5)
   at createBackend (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/ipfs-repo/src/backends.js:6:3)
   at Anonymous function (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/ipfs-repo/src/index.js:99:9)
   at nextTask (/private/var/containers/Bundle/Application/15CF067C-9130-441F-A05A-669FDB2D2CFD/IPFSMobile.app/nodejs-project/node_modules/async/waterfall.js:16:9)
obastemur commented 6 years ago

AFAIK you can’t require it but you may compile with the binary and require self

MagicLizi commented 6 years ago

thx ! Is there an example for leveldown-mobile on iOS

jijopulikkottil commented 4 years ago

yes, getting same error when using level down module in iOS with nodejs-mobile . Any idea how to fix it. I am using it in iOS (swift) native application.

_Error: dlopen(/private/var/mobile/Containers/Data/Application/F96F1926-4901-4103-AE41-D57EB4FB234F/Documents/nodejs-project/api/node_modules/leveldown/build/Release/leveldown.node, 1): no suitable image found. Did find: /private/var/mobile/Containers/Data/Application/F96F1926-4901-4103-AE41-D57EB4FB234F/Documents/nodejs-project/api/node_modules/leveldown/build/Release/leveldown.node: mach-o, but wrong architecture /private/var/mobile/Containers/Data/Application/F96F1926-4901-4103-AE41-D57EB4FB234F/Documents/nodejs-project/api/nodemodules/leveldown/build/Release/leveldown.node: mach-o, but wrong architecture