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

Data not getting written to Json file #37

Closed
arjunUnniumbath opened this issue Jan 6, 2021 · 7 comments
Closed

Data not getting written to Json file #37

arjunUnniumbath opened this issue Jan 6, 2021 · 7 comments

Comments

@arjunUnniumbath
Copy link

arjunUnniumbath commented Jan 6, 2021

The module is not working since few days.
As part of debugging, I created a foo.json and tried out the sample code given in the documentation.

The file is still turning up as blank. There is no error message being thrown too.

nodejs version is : v9.8.0 , os in windows 10 .

Is there any open issues in this regard ?

const writeJsonFile = require('write-json-file');

var test = async function () {
const writeJsonFile = require('write-json-file');
    await writeJsonFile('foo.json', {foo: true});
}
test();
@arjunUnniumbath
Copy link
Author

@sindresorhus

@sindresorhus
Copy link
Owner

Try with the latest Node.js version.

@arjunUnniumbath
Copy link
Author

Thank you for the prompt response .
working in "v12.18.4 " . but we have a dependency related issue to move the project above 10 :(

is there any other workaround ? @sindresorhus

@sindresorhus
Copy link
Owner

Not really. I don't have the time to look into a fix right now and it's also not a priority as I intend to target Node.js 12 and later in a few months. Node.js 10 is soon out of LTS, which means no support, even from the Node.js core team. Time to upgrade to Node.js 12 or later.

@arjunUnniumbath
Copy link
Author

arjunUnniumbath commented Jan 6, 2021

Thank you for the quick revert ! Will have to remove lots of dependencies in my project to be compatible with higher version I guess !!!! Thank you for the help ! @sindresorhus

@sindresorhus
Copy link
Owner

@arjunUnniumbath
Copy link
Author

Thank you @sindresorhus

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