Closed HR closed 8 years ago
this error most likely appears when you install leveldown using a different node version than when running the process. Something like
$ nvm use 4
$ npm install leveldown
$ nvm use 6
$ node index.js
your particular case might be a bit more complicated.
Can you confirm this is not the issue? Please post the results of
$ node -v
$ npm -v
$ npm --help | tail -1
If you're using electron, this can happen too, as electron bundles its own version of node.
Get the following stdout (with node v6.1.0)
v6.1.0
3.10.5
npm@3.10.5 /Users/HR/.nvm/versions/node/v6.1.0/lib/node_modules/npm
I am using electron v1.3.2 and it uses node 6.3.0. So, I tried to run it again but with node v6.3.0 (npm install from scratch and run electron-rebuild postinstall) and I still get the same error.
My node v6.3.0 setup
v6.3.0
3.10.3
npm@3.10.3 /Users/HR/.nvm/versions/node/v6.3.0/lib/node_modules/npm
Ah ok, so it is an electron related error. Can you try again with electron@1.1.3?
Just checked and it works for electron@1.1.3 (node v6.1.0). What was the problem? Electron v1.2.0 also has node v6.1.0 but gives
ReadError
at /Users/HR/GitHub/Crypter/node_modules/levelup/lib/levelup.js:220:15
Is there a way to fix this for the later releases of electron?
ok, this then looks like it's this bug: https://github.com/electron/electron/issues/5851, and the thread should provide you with all the information you need :)
I'm getting the follwing error for both node 6.0.0 and node 6.1.0 for leveldown@1.4.6 which apparantly added support for node v6
I have tried
npm rebuild
for both node versions but found no success