Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: dlopen failed: cannot locate symbol "napi_add_env_cleanup_hook" #42

Open
fastalks opened this issue Apr 26, 2023 · 0 comments
Open

Comments

@fastalks
Copy link

when I use leveldb in my nodejs project within nodejs-mobile-react-native, I got this error, can anyone help me ?

package.json

{ "name": "sample-node-project", "version": "0.0.1", "description": "node part of the project", "main": "main.js", "author": "janeasystems", "license": "ISC", "type": "module", "dependencies": { "level": "^8.0.0", }, "scripts": { "dev": "cross-env NODE_ENV=development nodemon index.js --watch server --exec babel-node", "build": "nuxt build", "start": "cross-env NODE_ENV=production node index.js --exec babel-node", "generate": "nuxt generate", "test": "echo \"Error: no test specified\" && exit 1" }, "keywords": [], "engines": { "node": ">=16" } }

main.js

`import { Level } from "level";

const db = new Level('./db', { valueEncoding: 'json' })
await db.put('name', "value")`

error

E/nodejs: node:internal/modules/cjs/loader:1210 E/nodejs: return process.dlopen(module, path.toNamespacedPath(filename)); E/nodejs: ^ E/nodejs: E/nodejs: Error: dlopen failed: cannot locate symbol "napi_add_env_cleanup_hook" referenced by "/data/data/com.awesomeproject/files/nodejs-project/node_modules/classic-level/prebuilds/android-arm64/node.napi.armv8.node"... E/nodejs: at Object.Module._extensions..node (node:internal/modules/cjs/loader:1210:18) E/nodejs: at Module.load (node:internal/modules/cjs/loader:1004:32) E/nodejs: at Function.Module._load (node:internal/modules/cjs/loader:839:12) E/nodejs: at Module.require (node:internal/modules/cjs/loader:1028:19) E/nodejs: at require (node:internal/modules/cjs/helpers:102:18) E/nodejs: at load (/data/data/com.awesomeproject/files/nodejs-project/node_modules/node-gyp-build/node-gyp-build.js:22:10) E/nodejs: at Object.<anonymous> (/data/data/com.awesomeproject/files/nodejs-project/node_modules/classic-level/binding.js:1:43) E/nodejs: at Module._compile (node:internal/modules/cjs/loader:1126:14) E/nodejs: at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) E/nodejs: at Module.load (node:internal/modules/cjs/loader:1004:32) { E/nodejs: code: 'ERR_DLOPEN_FAILED' E/nodejs: }

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

No branches or pull requests

1 participant