Hi, I've upgraded getstream from getstream@7.4.1 to getstream@8.1.5, but now I'm getting all sorts of errors when I try to connect to the client.
Uncaught TypeError: axios.default.create is not a function
at new StreamClient (client.js:220:1)
at connect (connect.js:46:1)
Here's my React app code for setting up the client.
import { StreamClient, connect } from "getstream";
const useCreateFeedClient = () => {
const { STREAM_KEY, STREAM_APP_ID } = useConfig();
const { data: streamToken } = useStreamTokenQuery();
const [feed, setFeed] = useState<StreamClient>(undefined!);
useEffect(() => {
if (!streamToken) return;
setFeed(connect(STREAM_KEY, streamToken.feed, STREAM_APP_ID));
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [streamToken]);
return feed;
};
What am I doing wrong here?
I noticed in 7.4.1 axios is 0.22, but on 8.1.5 axios is 1.4. I'm a bit puzzled. Here's my tsconfig.json just in case.
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noFallthroughCasesInSwitch": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",
},
"include": [
"src",
"src/service-worker.ts"
]
}
Hi, I've upgraded getstream from
getstream@7.4.1togetstream@8.1.5, but now I'm getting all sorts of errors when I try to connect to the client.Here's my React app code for setting up the client.
What am I doing wrong here?
I noticed in 7.4.1 axios is 0.22, but on 8.1.5 axios is 1.4. I'm a bit puzzled. Here's my tsconfig.json just in case.