Effect CommunityEC
Effect Community2y ago
14 replies
sandromaglione

Next.js with Node's FileSystem leads to parsing error in undici module

I am getting an issue with platform when using FileSystem from node in nextjs

 ⨯ ./node_modules/.pnpm/undici@6.16.1/node_modules/undici/lib/web/fetch/util.js
Module parse failed: Unexpected token (882: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 trace for requested module:
./node_modules/.pnpm/undici@6.16.1/node_modules/undici/lib/web/fetch/util.js
./node_modules/.pnpm/undici@6.16.1/node_modules/undici/lib/web/fetch/index.js
./node_modules/.pnpm/undici@6.16.1/node_modules/undici/index.js
./node_modules/.pnpm/@effect+platform-node@0.49.4_@effect+platform@0.53.4_effect@3.1.4/node_modules/@effect/platform-node/dist/esm/internal/http/clientUndici.js
./node_modules/.pnpm/@effect+platform-node@0.49.4_@effect+platform@0.53.4_effect@3.1.4/node_modules/@effect/platform-node/dist/esm/NodeHttpClient.js
./node_modules/.pnpm/@effect+platform-node@0.49.4_@effect+platform@0.53.4_effect@3.1.4/node_modules/@effect/platform-node/dist/esm/index.js
./lib/services/Mdx.ts
Was this page helpful?