save file error
Closed this issue · 5 comments
fcpauldiaz commented
I get this error when I try to save a file.
An error occurred: TypeError: fs.openAsync is not a function
Here is my code
DBFFile.create(`Archivo - ${moment().format(format)}.dbf`, fieldDescriptors)
.then(dbf => {
console.log('DBF file created.');
return dbf.append(rows);
})
.then(() => console.log(rows.length + ' rows added.'))
.catch(err => console.log('An error occurred: ' + err));
fcpauldiaz commented
yortus commented
Hi @fcpauldiaz sorry for the long delay.
I just did a fresh install and ran the tests and don't get any errors.
If this is still an issue for you, could you provide some steps I can follow to reproduce the error you are getting?
fcpauldiaz commented
I'm trying to save it from the browser, I'm not sure if that is supported.
Seikho commented
The browser doesn't have Node's fs
module. You'll most likely need to use a server that exposes an API that performs the DB writes.
fcpauldiaz commented
Ok, thanks