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

readFile does not seem to accept options object #55

Open
turnerhayes opened this issue Feb 10, 2018 · 2 comments
Open

readFile does not seem to accept options object #55

turnerhayes opened this issue Feb 10, 2018 · 2 comments

Comments

@turnerhayes
Copy link

When I run fs.readFile(somePath, { encoding: "utf8" }, (err, content) => {}), which (I think) works with the native Node fs module, it throws an error TypeError: Unknown encoding: [object Object]. It seems to work if I just pass "utf8", rather than an object.

@Viijay-Kr
Copy link

@turnerhayes This issue should have existed until this #39 was merged. Since its was merged long back I think this issue is not valid anymore.Thanks!

@mpetrovich
Copy link

I can confirm that this issue still exists.

This doesn't work:

fs.readFile(filepath, { encoding: 'utf8' })

This does work:

fs.readFile(filepath, 'utf8')

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

3 participants