level: TypeError: exists is not a function

Hi, I’m getting this error when using Level.

Console shows the error here, which is in bindings module:

exports.getRoot = function getRoot (file) {
  var dir = dirname(file)
    , prev
  while (true) {
    if (dir === '.') {
      // Avoids an infinite loop in rare cases, like the REPL
      dir = process.cwd()
    }
    if (exists(join(dir, 'package.json')) || exists(join(dir, 'node_modules'))) {
      // Found the 'package.json' file or 'node_modules' dir; we're done
      return dir
    }

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Reactions: 5
  • Comments: 21 (11 by maintainers)

Most upvoted comments

Found that the fix is in TooTallNate/node-bindings#20 (as stated above). The PR for the commit is still open though, so it hasn’t been updated.