How to use the client on Node environment (
ReferenceError: fetch is not defined) ?¶
import fetch from 'node-fetch' import CozyClient from 'cozy-client' global.fetch = fetch
Then you will be able to use all the client methods and fetch data correctly.
When using cozy-client on Node environment, you don’t have access to all React
specific APIs. If, for any reason, you want to access these APIs, you can still
import them from