Can not use fs anymore.
ramwin opened this issue · comments
Xiang Wang commented
When I tried the example first
const Fs = require('fs');
const CsvReadableStream = require('csv-reader');
let inputStream = Fs.createReadStream('my_data.csv', 'utf8');
inputStream
.pipe(new CsvReadableStream({ parseNumbers: true, parseBooleans: true, trim: true }))
.on('data', function (row) {
console.log('A row arrived: ', row);
})
.on('end', function (data) {
console.log('No more rows!');
});
An error occured. I find the problem is about the fs package. The link shows that:
This package name is not currently in use, but was formerly occupied by another package. To avoid malicious use, npm is hanging on to the package name, but loosely, and we'll probably give it to you if you want it.
I can't use or test this package further after this stuck.
Can anyone update the documentation or tell me how to solve it?
Daniel Cohen Gindi commented
You probably tried to npm install fs
, but fs
is part of nodejs. Do not try to install it.