Closed takotaco closed 4 years ago
I think this is just a misunderstanding of what "client-side" means in this context. It doesn't mean "in a web browser"— it means "in any context that is not server-side".
A web browser is one kind of client-side environment, but not the only kind. It sounds like you are writing front-end JavaScript code, so what you want to use is launchdarkly-js-client-sdk.
The purpose of launchdarkly-node-client-sdk is for client-side code that runs in Node.js. It differs from the server-side Node SDK, launchdarkly-node-server-sdk, in that it is meant to be deployed in some environment that belongs to an end user, rather than to the application maintainer, and that runs for one end user at a time rather than servicing requests from many users. For instance, it could be a command-line tool. It has nothing to do with web browsers, and if your code is not actually running in Node.js then you have no reason to use this.
Okay, I see. Sorry for the confusion. I'll look into the js SDK you linked, I must have missed that.
Describe the bug I'm getting this error:
I don't understand why it is trying to access the file system for a client-side web SDK. Help?
To reproduce
npm install launchdarkly-node-client-sdk@1.4.0 --save
Expected behavior No errors, especially not one related to being able to access fs, as this is a client side sdk.
Logs see above
SDK version
"launchdarkly-node-client-sdk": "^1.4.0",
Language version, developer tools node, webpack, react/redux.
OS/platform MacOS
Additional context Add any other context about the problem here.