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

Library not intended for use in a browser? #5

Closed
aweber1 opened this issue Jan 22, 2021 · 3 comments
Closed

Library not intended for use in a browser? #5

aweber1 opened this issue Jan 22, 2021 · 3 comments

Comments

@aweber1
Copy link

aweber1 commented Jan 22, 2021

Hello,

I'm trying to integrate this library into an application that is running in the browser. However, there are Node module dependencies preventing that from happening. In particular, the fs module.

import contentstack from '@contentstack/management';

results in a Module note found: can't resolve 'fs' error message.

I have verified that the import statement is resolving to node_modules/@contentstack/management/dist/web/contentstack-management.js. However, it appears that the web version of the library build contains a require("fs") statement.

Is this library not intended for use in a browser? If so, I would recommend clearly stating that in the readme. However, if it is intended to be used in the browser, I think some refactoring may be in order to remove the dependencies on Node core modules.

@uttamukkoji
Copy link
Contributor

Hello @aweber1 ,

We do not recommend to used this library in browser. We will update the readme file with note stating not supported for browser. Thanks for the raising this issue and helping us to improve this library.

@aweber1
Copy link
Author

aweber1 commented Jan 22, 2021

Ok, thank you!

@uttamukkoji
Copy link
Contributor

Closing this issue as there is no support for in browser.

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

2 participants