How to get this file in fs:
'../dist/index.js'
i tried this:
fs.readFile(path.join(__dirname, '../dist/index.js')
but it's not working.
Try this:
fs.readFile(path.join(__dirname, '/../dist/index.js'))
This will work on all OS
fs.readFile(path.join(__dirname, '..', 'dist', 'index.js'));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With