I am trying to use readFile from fs module(node version 5.3.0). But I get an error saying module not found. Do i need to install fs module separately? If so exactly what package to install? It is not available by default?
Tried using fs as:
var freader = require('fs');
freader.readFile(...
Here is the documentation about fs.
File I/O is provided by simple wrappers around standard POSIX functions. To use this module do require('fs'). All the methods have asynchronous and synchronous forms.
You have no npm package to install, it's included in node.js.
EDIT: here is the documentation of fs for node v5.3 and it's the same
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