douzi8/file-system

Getting Uncaught Type Error

Opened this issue · 5 comments

Hello,

I have used file-system npm package to write content to a file.
While I run the code, I get -

"ncaught TypeError: fs.existsSync is not a function
at getExists (bundle.js:115)
at Object.exports.mkdir (bundle.js:145)
at Object.exports.writeFile (bundle.js:216)
at run (bundle.js:639)
at FileReader.reader.onload (bundle.js:648)"

error in the generated bundle.js

I am using following command to generate bundle.js -
$ browserify www/js/app.js -o www/js/bundle.js

Also, I have installed required npm packages.

Kindly, let me know how can I solve this error.

Thanks - Siddharth

What's your node's version

Hi @douzi8 ,

My node and npm versions are:

$ node -v v6.9.2
$ npm -v 4.0.5

Thanks - Siddharth

I am using this with angular 2 how should i import fs in to angular2

I am also getting this error

I'm getting this error too,
TypeError: fs.existsSync is not a function
Is there anyone working on this? Is there some other module I should be using?
file-system@2.2.2
node v8.12.0
npm 6..4.1
windows 10 1803 2018-10-09