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

fs.readFileSync is not a function #16

Closed
95sunny opened this issue Jan 26, 2022 · 1 comment
Closed

fs.readFileSync is not a function #16

95sunny opened this issue Jan 26, 2022 · 1 comment

Comments

@95sunny
Copy link

95sunny commented Jan 26, 2022

How do I use "fs" in my browser

@reviewher
Copy link
Contributor

"file" mode (using fs) is for nodejs only. For browser use, you need to pull in data with fetch or XHR or FileReader depending on where the file is stored. The example index.html uses FileReader

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