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

Node 8.1.2 public ressources error #740

Open
TimDorand opened this issue Jul 21, 2017 · 7 comments
Open

Node 8.1.2 public ressources error #740

TimDorand opened this issue Jul 21, 2017 · 7 comments

Comments

@TimDorand
Copy link

Geddy doesn't load the public ressources stored in /public/*
Log:

[Fri, 21 Jul 2017 09:44:44 GMT] ERROR ::1 - - [Fri Jul 21 2017 11:44:43 GMT+0200 (CEST)] "GET /favicon.ico 1.1" 500 1348 "http://localhost:4000/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.86 Safari/537.36 OPR/46.0.2597.32"
TypeError: Second argument needs to be a buffer
    at Object.fs.read (fs.js:669:11)
    at streamChunk (/home/tdorand/.nvm/versions/node/v8.1.2/lib/node_modules/geddy/lib/response/index.js:139:16)
    at /home/tdorand/.nvm/versions/node/v8.1.2/lib/node_modules/geddy/lib/response/index.js:154:11
    at FSReqWrap.oncomplete (fs.js:135:15)

I had to switch back to node 7.9.0

->       v7.9.0
         v8.1.2
@phanect
Copy link
Member

phanect commented Jul 21, 2017

Unfortunately Geddy is not actively developed now, and it only work on Node 6.x.

@mde mde reopened this Jul 30, 2017
@mde
Copy link
Contributor

mde commented Jul 30, 2017

Let's keep this open -- should be a relatively easy fix.

@ramyfarid922
Copy link

I faced this too while starting the app. It loaded the main index page but without the bootstrap files and the error is not revealing anything. It's just faulty out of the box!

@mde
Copy link
Contributor

mde commented Aug 21, 2017

Fixed in master, b8c3a2e. I'll push out a new release if someone else can verify fixed.

@ckhatton
Copy link
Member

ckhatton commented Nov 6, 2017

@TimDorand @ramyfarid922

Possible for either of you to verify that it is fixed? :octocat:

@Casablanca94
Copy link

Thanks, already helped me.

@abrakadobr
Copy link

i'm sorry, lazy to do nice patch...

file geddy/lib/response/index.js
lines 140 +-

//my new code for file reading
        fs.readFile(filepath,(err,fileData)=>{
          console.log(['FILE',fileData.length,fileData])
          self.resp._length = fileData.length;
          self.resp.write(fileData, encoding);
          self.resp.end();
        })
/*
and commended after this line
// From Paperboy, http://github.com/felixge/node-paperboy
*/

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

7 participants