My code:
fs.writeFileSync('file.txt', 'hello world');
This works fine on windows, but on ubuntu, I keep getting this: Error: EACCES: permission denied, open 'file.txt'
How do I get past this error and allow permissions to my project so it can write a file?
provide write permission to your directory. following is the link of that: https://askubuntu.com/q/402980