-
Notifications
You must be signed in to change notification settings - Fork 774
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
Issues using writeJson with Babel #157
Comments
What is the output that you get from this snippet? var fs = require('fs-extra')
var data = { name: 'jp' }
fs.jsonfile.spaces = 4
fs.writeJson('/tmp/test.json', data, function (err) {
if (err) console.error(err)
var text = fs.readFileSync('/tmp/test.json', 'utf8')
console.log(text)
}) |
Well... the output is correct:
To be honest, I really use
And... the output is still correct:
Now I was really confused... why doesn't it work for me outside of this small test case? I use
And... BAM... this is the error:
The same happens if I use So... if Babel got the spec right (cc @sebmck) and doesn't have a bug, I'd say this is a bug on |
@jprichardson Any ideas? I've got other more pressing things ATM. |
This is over a year old. If there is still some issue with the latest versions and Babel6, feel free to reopen @donaldpipowitch. |
If I
writeJson
my output isn't formatted. I think this is a problem withjsonfile
? I use the most recent version.The text was updated successfully, but these errors were encountered: