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

readFileSync signature changed in node 0.10, 0.8 and up may cause errors #5

Open
mrvdb opened this issue Nov 4, 2013 · 1 comment

Comments

@mrvdb
Copy link

mrvdb commented Nov 4, 2013

In utmlish.js on line 68:

pcache[name] = _.template(fs.readFileSync(resolveSync(name + ".utml"),{encoding: 'utf8'}));

will generate an invalid encoding error. It seem that the signature of that function changed in version 0.10. Changing the line to

pcache[name] = _.template(fs.readFileSync(resolveSync(name + ".utml"),'utf8'));

makes it work for 0.8.20 at least.

I ran into this using a local install of pump2status.net.

@johan
Copy link

johan commented Mar 18, 2014

FWIW: yes, node v0.10.24 does accept the old-style encoding parameter in your change suggestion.

(And thanks for a google-friendly problem description – I was looking for how to make fs.readFileSync 0.8 friendly for a different project. :-)

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