Closed Jakub-Vacek closed 3 years ago
I am trying to use this repo in station but during build of station a get TS error:
node_modules/@superfaceai/brain-client/dist/client.d.ts:1:39 - error TS2307: Cannot find module 'cross-fetch/lib.fetch' or its corresponding type declarations. 1 import { RequestInit, Response } from 'cross-fetch/lib.fetch';
It looks like cross-fetch uses type RequestInit and Request from lib.dom so maybe we could omit [this line]?(https://github.com/superfaceai/brain-client/blob/main/src/client.ts#L2)
cross-fetch is in dependencies of brain-client, the module should be resolved. I decided to use it to support node and browser runtimes.
cross-fetch
brain-client
I am going to look into it in more detail.
I am trying to use this repo in station but during build of station a get TS error:
It looks like cross-fetch uses type RequestInit and Request from lib.dom so maybe we could omit [this line]?(https://github.com/superfaceai/brain-client/blob/main/src/client.ts#L2)