Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Uncaught Type Error #3

Open
siddharthnaik7 opened this issue Mar 14, 2017 · 5 comments
Open

Getting Uncaught Type Error #3

siddharthnaik7 opened this issue Mar 14, 2017 · 5 comments

Comments

@siddharthnaik7
Copy link

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

@douzi8
Copy link
Owner

douzi8 commented Mar 15, 2017

What's your node's version

@siddharthnaik7
Copy link
Author

Hi @douzi8 ,

My node and npm versions are:

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

Thanks - Siddharth

@vamsyvirureddy
Copy link

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

@jwmann
Copy link

jwmann commented Nov 24, 2017

I am also getting this error

@FrancisVila
Copy link

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?
[email protected]
node v8.12.0
npm 6..4.1
windows 10 1803 2018-10-09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants