Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

iOS wrong architecture #16

Closed
MagicLizi opened this issue Mar 29, 2018 · 3 comments
Closed

iOS wrong architecture #16

MagicLizi opened this issue Mar 29, 2018 · 3 comments

Comments

@MagicLizi
Copy link

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
Copy link
Contributor

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

@MagicLizi
Copy link
Author

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

@jijopulikkottil
Copy link

jijopulikkottil commented Aug 11, 2020

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/node_modules/leveldown/build/Release/leveldown.node: mach-o, but wrong architecture

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants