Bindings error on node.js

javascript

#1

Can you help me solve this error?

/rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/bindings/1.2.1/node_modules/bindings/bindings.js:91

throw err

^

Error: Could not locate the bindings file. Tried:

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/build/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/build/Debug/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/build/Release/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/out/Debug/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/Debug/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/out/Release/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/Release/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/build/default/leveldown.node

→ /rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/compiled/10.15.0/linux/x64/leveldown.node

at bindings (/rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/bindings/1.2.1/node_modules/bindings/bindings.js:88:9)

at Object.<anonymous> (/rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/leveldown/1.7.2/node_modules/leveldown/leveldown.js:4:46)

at Module._compile (internal/modules/cjs/loader.js:689:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)

at Module.load (internal/modules/cjs/loader.js:599:32)

at tryModuleLoad (internal/modules/cjs/loader.js:538:12)

at Function.Module._load (internal/modules/cjs/loader.js:530:3)

at Module.require (internal/modules/cjs/loader.js:637:17)

at require (internal/modules/cjs/helpers.js:22:18)

at Object.<anonymous> (/rbd/pnpm-volume/1740552a-0ff5-48d1-81e1-0e289e6af7f1/node_modules/.registry.npmjs.org/level/1.7.0/node_modules/level/level.js:1:106)

#2

Can you show me your Package.json?


#3
{
  "name": "name",
  "version": "1.0.0",
  "description": "description",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "engine": {
    "node": "10.15.1"
  },
  "author": "Near",
  "dependencies": {
    "better-sqlite3": "^5.4.0",
    "canvas": "^2.3.1",
    "discord.js": "^11.4.2",
    "enmap": "^0.3.2",
    "express": "^4.16.4",
    "file-system": "^2.2.2",
    "moment": "^2.24.0",
    "node-gyp": "^3.8.0",
    "node-superfetch": "^0.1.9",
    "quick.db": "^7.0.0-b21"
  }

MOD EDIT: formatting


#4

Ok, First of all, You do not need node-gyp in your dependencies, as that has caused the same error you are experiencing, for many other people. After doing that, tell me if the problem still continues, or has changed in any way! :slight_smile:


#5

I removed node-gyp but the error still remains the same


#6

Ok, Here are a few more things you can try, hopefully one of these can help!

pnpm install , enable-pnpm
Can you try both of those in the command line, it may not be the problem, but it is worth the shot!


#7

It did not work yet, I’ll see solutions without using fs, thanks for the help :slight_smile:


split this topic #8

A post was merged into an existing topic: I can’t access simple node.js server, but I could before


#9

Hey @Near, sorry for the confusion earlier - I added a response to a different topic to your by mistake.

Can you provide your project name so someone can take a closer look?


#10

So I was able to solve the problem, the problem was in the Enmap package that was outdated, thanks for helping me! :blush: