js-kubo-rpc-client icon indicating copy to clipboard operation
js-kubo-rpc-client copied to clipboard

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

Open jianping5 opened this issue 1 year ago • 1 comments

./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();

jianping5 avatar May 02 '24 07:05 jianping5

I also get this error

khankluan24 avatar May 28 '24 05:05 khankluan24