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

save file error #14

Closed
fcpauldiaz opened this issue Feb 6, 2018 · 5 comments
Closed

save file error #14

fcpauldiaz opened this issue Feb 6, 2018 · 5 comments

Comments

@fcpauldiaz
Copy link

fcpauldiaz commented Feb 6, 2018

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
Copy link
Author

@yortus

@yortus
Copy link
Owner

yortus commented Feb 23, 2018

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
Copy link
Author

I'm trying to save it from the browser, I'm not sure if that is supported.

@Seikho
Copy link

Seikho commented Feb 24, 2018

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
Copy link
Author

Ok, thanks

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