const fs = require('fs');
let initialValue = '';
fs.readFile('../previewFirst.txt', (err, data) => {
if (err)
throw err;
console.log(data.toString());
initialValue = data.toString();
});
I am using github codespaces, but I can't use require despite node.js being built in to codespace (or at least in my project it told me it had node.js)
The codespace should come with node.js, yet I can't use require.
My error: Module not found: Error: Can't resolve 'fs' in '/workspaces/codespaces-react/src/features'
I tried to edit the devcontainer, to see that node.js was, in fact, installed.