README.md Example Results in Errors
See original GitHub issueThe example provided in the README.md
:
var levelup = require('levelup')
var leveldown = require('leveldown')
// 1) Create our database
var db = levelup(leveldown('./mydb'))
// 2) put a key & value
db.put('name', 'LevelUP', function (err) {
if (err) return console.log('Ooops!', err) // some kind of I/O error
// 3) fetch by key
db.get('name', function (err, value) {
if (err) return console.log('Ooops!', err) // likely the key was not found
// ta da!
console.log('name=' + value)
})
})
installed with:
npm install --save levelup leveldown
errors with the following with Node ver. 8.3.0:
test-leveldb\node_modules\levelup\lib\levelup.js:74
throw error
^
InitializationError: Must provide a location for the database
at new LevelUP (test-leveldb\node_modules\levelup\lib\levelup.js:67:13)
at LevelUP (test-leveldb\node_modules\levelup\lib\levelup.js:45:44)
at Object.<anonymous> (test-leveldb\index.js:5:10)
at Module._compile (module.js:573:30)
at Object.Module._extensions..js (module.js:584:10)
at Module.load (module.js:507:32)
at tryModuleLoad (module.js:470:12)
at Function.Module._load (module.js:462:3)
at Function.Module.runMain (module.js:609:10)
at startup (bootstrap_node.js:158:16)
and the following in Node ver. 6.11.4.
test-leveldb\node_modules\bindings\bindings.js:88
throw e
^
Error: Module version mismatch. Expected 48, got 57.
at Error (native)
at Object.Module._extensions..node (module.js:597:18)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at bindings (test-leveldb\node_modules\bindings\bindings.js:81:44)
at Object.<anonymous> (test-leveldb\node_modules\leveldown\leveldown.js:4:46)
at Module._compile (module.js:570:32)
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
results/README.md at main · expo/results
An efficient, standards-compliant library for representing results of successful or failed operations - results/README.md at main · expo/results.
Read more >How can I test what my readme.md file will look like before ...
For example: http://localhost/github/readme.html?myrepo or - Copy this file to the directory that contains a README.md, and then browse to this file without ...
Read more >Making a PyPI-friendly README
README files for Python projects are often named README , README.txt , README.rst , or README.md . For your README to display properly...
Read more >README File – Everything you Need to Know
A README file is a text file that describes and launches a project. It comprises information that is frequently needed to grasp the...
Read more >What Is README.md? How Do I Fix These Errors?
README.md problems include application errors, missing files, and possible virus infection. Here are the top five most common README.md problems and how to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@vweevers I want to get it out this week the latest.
The documentation in our
master
branch is for the upcominglevelup@2
release. For the currently publishedlevelup@1
, see the old readme here or here.Regarding the second error (
Module version mismatch
): it means that your installed version ofleveldown
was built for a different node version. Please try reinstallingleveldown
and let us know how it goes.@ralphtheninja let’s release 2.0.0 soon and/or try to clarify all of this in the readme.