Answer the question
In order to leave comments, you need to log in
Why is the data not being written to the file?
Hello! Please help me figure out why it is not possible to write data to the file.
The data.json file is in the same folder as the script.
The console gives a null response.
Why does not write down, I'll never know.
const fs = require("fs-extra");
fs.outputJson("./data.json", {name: 'JP'}, err => console.log(err))
[
{
"input": "абвгдеёжзийклмнопрстуфхцчшщъыьэюя",
"output": "normal"
},
{
"input": "абвгдеёжзийклмнопрстуфхцчшщъыьэюя",
"output": "normal"
}
]
Answer the question
In order to leave comments, you need to log in
In general, I figured it out. The function works, the problem was in the file path.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question