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

Broken when graceful-fs 3.0 loaded in node.js 0.11.13 #6

Closed
davisford opened this issue Sep 21, 2014 · 6 comments
Closed

Broken when graceful-fs 3.0 loaded in node.js 0.11.13 #6

davisford opened this issue Sep 21, 2014 · 6 comments
Labels

Comments

@davisford
Copy link

If I nvm use v0.11.13 and re-run my app, it blows up on etag here:

TypeError: argument entity must be string, Buffer, or fs.Stats
    at etag (/proj/node_modules/express/node_modules/etag/index.js:55:11)
    at SendStream.setHeader (/proj/node_modules/express/node_modules/send/index.js:724:15)
    at SendStream.send (/proj/node_modules/express/node_modules/send/index.js:500:8)
    at onstat (/proj/node_modules/express/node_modules/send/index.js:585:10)
    at Object.oncomplete (fs.js:97:15) 

versions in use: [email protected], [email protected]

@dougwilson
Copy link
Contributor

etag works fine with 0.11.13. It's a bug with graceful-fs not working with 0.11.13. Please see isaacs/node-graceful-fs#31

If you downgrade to 0.11.12 or don't use graceful-fs or make sure every single graceful-fs in your dependency tree is less than 3.0 you won't have issues.

@dougwilson
Copy link
Contributor

@Fishrock123 it's a graceful-fs bug with the 3.0 line that still hasn't been fixed is all.

@dougwilson
Copy link
Contributor

Oh, and, sorry, by "not fixed" I mean it has been fixed 10 days ago, but just never published to npm yet. Feel free to bug graceful-fs :)

@dougwilson dougwilson changed the title Upgrade etag to work with node v0.11 Broken when graceful-fs 3.0 loaded in node.js 0.11.13 Sep 21, 2014
@Fishrock123
Copy link
Member

Related issue is isaacs/node-graceful-fs#31

In theory, if the dep requirement for graceful-fs is soft pinned to minor (^ or ~ or .x), you could just require the commit in your own package.json and the dep would resolve to that.

e.g.

{
  "dependancies": {
    "graceful-fs": "isaacs/node-graceful-fs#34e473a"
  }
}

@dougwilson
Copy link
Contributor

I'm tired of these reports because of graceful-fs not supporting 0.11.13 and the fixed not being published yet. I'm adding support to this module for "fake" fs.Stats. This will mean your code will work, though be a little slower until graceful-fs is updated to support 0.11.13.

@dougwilson
Copy link
Contributor

graceful-fs 3.0.3 has been released with the fix. In addition, this module has been working-around the issue for a while now :)

@jshttp jshttp locked and limited conversation to collaborators Oct 7, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants