ipfs / js-kubo-rpc-client

A client library for the Kubo RPC API
https://www.npmjs.com/package/kubo-rpc-client
Other
33 stars 7 forks source link

Introduce this library into the Next.js project, and report an error in the undici part #232

Open jianping5 opened 5 months ago

jianping5 commented 5 months ago

./node_modules/undici/lib/web/fetch/util.js Module parse failed: Unexpected token (874:57) | // 5. If object is not a default iterator object for interface, | // then throw a TypeError.

  if (typeof this !== 'object' || this === null || !(#target in this)) {

| throw new TypeError( | 'next' called on an object that does not implement interface ${name} Iterator.

引入代码如下:

import { create } from 'kubo-rpc-client'

// connect to the default API address http://localhost:5001
const client = create();
khankluan24 commented 4 months ago

I also get this error