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

mockfs is broken since node 0.11.13 #9

Closed
mlegenhausen opened this issue May 9, 2014 · 3 comments
Closed

mockfs is broken since node 0.11.13 #9

mlegenhausen opened this issue May 9, 2014 · 3 comments

Comments

@mlegenhausen
Copy link
Contributor

The problem is that process.binding('fs') does return an object that does not include Stats anymore.

The binding obj:

{ FSInitialize: [Function],
  close: [Function: close],
  open: [Function: open],
  read: [Function: read],
  fdatasync: [Function: fdatasync],
  fsync: [Function: fsync],
  rename: [Function: rename],
  ftruncate: [Function: ftruncate],
  rmdir: [Function: rmdir],
  mkdir: [Function: mkdir],
  readdir: [Function: readdir],
  stat: [Function: stat],
  lstat: [Function: lstat],
  fstat: [Function: fstat],
  link: [Function: link],
  symlink: [Function: symlink],
  readlink: [Function: readlink],
  unlink: [Function: unlink],
  writeBuffer: [Function: writeBuffer],
  writeString: [Function: writeString],
  chmod: [Function: chmod],
  fchmod: [Function: fchmod],
  chown: [Function: chown],
  fchown: [Function: fchown],
  utimes: [Function: utimes],
  futimes: [Function: futimes],
  StatWatcher: [Function: StatWatcher] }

The Error message:

TypeError: Cannot read property 'prototype' of undefined
    at Object.<anonymous> (/Users/mlegenhausen/dev/werk85/dk-navigator/server/node_modules/mock-fs/node/fs-0.11.10.js:122:9)
@tschaub
Copy link
Owner

tschaub commented May 9, 2014

Thanks for the report. I made a change to support 0.11.13 when it came out. I'll cut a release with this shortly.

@mlegenhausen
Copy link
Contributor Author

Thanks :)

@tschaub
Copy link
Owner

tschaub commented May 9, 2014

Fix in 26c10b2 and published as [email protected].

@tschaub tschaub closed this as completed May 9, 2014
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

2 participants