Closed ScreamZ closed 5 months ago
Hi, I'll try to take a look, can you share a message that references deepstream explicitly? That error doesn't...
It doesn't, just try to import the SDK (installed with the REACT_NATIVE env var) somewhere and you end up with this… :'(
Ok, found a few bugs, solved in lateste release v7.0.1
These are my steps using expo:
npx create-expo-app my-app --template bare-minimum
cd my-app
DEEPSTREAM_ENV=react-native npm install @deepstream/client
npx expo start
it works as expected
Please reopen with detailed steps to reproduce if the problem persists
Looks like it's not working in my project still, I'll check deeper but we have an issue I guess.
Also, I've some concerns about the technique of doing the install using an env variable. As far as I can see, this will run a post-install script that changes code in the node_modules.
With this technique this work on the computer that initially did the installation. But coworkers that pull your changes on git just end up with the "standard" version.
I guess it would be better to add some checks in the code to check whether or not we are in react native environment.
See https://github.com/facebook/react-native/commit/3c65e62183ce05893be0822da217cb803b121c61
@jaime-ez what do you think ?
PS : I'll give detailed reproduction soon
Hi, take a look at the original issue https://github.com/deepstreamIO/deepstream.io-client-js/issues/534 for some background.
An option you can take is that in your own project's package.json add a postinstall script:
{
"scripts" : {
"postinstall": "DEEPSTREAM_ENV=react-native node node_modules/@deepstream/client/scripts/postinstall.js"
}
}
That way anyone who clones your repo will have the desired version
closing due to inactivity, please provide more information if the problem persists
Hi,
Just wanted to share that the Client SDK no longer works with react native and expo.
Expo version : "expo": "~47.0.12",