I want to be able to write files from client.js, though it never works, any ideas?
Hey @Andrew-Eathan, welcome to the Glitch forum!
I’m not sure I understand what you’re trying to accomplish; can you give us a little more info on what you’re trying to do? Maybe some sample code or a project name?
I can’t run this code in server.js because it needs the document and window variables.
Typically, npm modules are server-sided. FS will only work on the server in order to prevent vulnerabilities in your project. You can try to send a request to the server with the document and window variable defined.