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

fs module is obsolete #79

Open
sagarpanchal8793 opened this issue Oct 24, 2018 · 5 comments
Open

fs module is obsolete #79

sagarpanchal8793 opened this issue Oct 24, 2018 · 5 comments

Comments

@sagarpanchal8793
Copy link

I don't know what does they mean on their site (https://www.npmjs.com/package/fs) but the package is creating build issues in my vue and nuxt js application. Kindly look into it as I need Zookeeper client for service discovery.

@sagarpanchal8793
Copy link
Author

The build error specifically says this:

Module not found: Error: Can't resolve 'fs' in 'xx/xx/xx/node_modules\node-zookeeper-client\lib\jute'
@ ./node_modules/node-zookeeper-client/lib/jute/index.js 14:9-22
@ ./node_modules/node-zookeeper-client/index.js
@ ./zookeeper.js

@alexguan
Copy link
Owner

I will publish a version that removes it.

@alexandrklimov
Copy link

@alexguan
Hi Alex!

I've tried to use your module(^1.1.0) and get the same error about jute.

May be you know any workaround about that error?

@alexguan
Copy link
Owner

I will take a look this weekend

@alexandrklimov
Copy link

alexandrklimov commented Aug 18, 2020

@alexguan
Hi Alex!
It seem that it isn't problem of you library, but some specific behaviour in the Electron environment, be precise - compilation for it.

It's my bad - I've should google this problem carefully.

Here is some links about if someone else will face with such trouble:
webpack/webpack#10199
https://stackoverflow.com/questions/48476061/electron-and-typescript-fs-cant-be-resolved

In addition.
I've google a bit and Ithink this info. will be usefull for everyone who will faced with the same issue (Angular + Electron + any-low-level-lib):
Why we can't use low-lvel (f.e. fs) API

And I've found solution in using the next method of import:
this.zkClientModule = (window as any).require('node-zookeeper-client');

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

3 participants