You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open http://localhost:3000. Click the only button and watch the server console for errors.
What is the expected behavior?
Should output a list of files from /tmp
What do you see instead?
In main branch, with "@effect/platform-node": "^0.45.28",
⨯ ./node_modules/undici/lib/web/fetch/util.js
Module parse failed: Unexpected token (884: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/undici/lib/web/fetch/util.js
./node_modules/undici/lib/web/fetch/index.js
./node_modules/undici/index.js
./node_modules/@effect/platform-node/dist/esm/internal/http/clientUndici.js
./node_modules/@effect/platform-node/dist/esm/NodeHttpClient.js
./node_modules/@effect/platform-node/dist/esm/index.js
./src/app/action.ts
In errors-but-still-works branch, with "@effect/platform-node": "0.45.14":
./node_modules/@parcel/watcher/index.js
Module not found: Can't resolve './build/Debug/watcher.node' in '/Users/patr/Code/next-effect-fs-bug/node_modules/@parcel/watcher'
Import trace for requested module:
./node_modules/@parcel/watcher/index.js
./node_modules/@effect/platform-node-shared/dist/esm/internal/fileSystem.js
./node_modules/@effect/platform-node-shared/dist/esm/NodeFileSystem.js
./node_modules/@effect/platform-node/dist/esm/NodeContext.js
./node_modules/@effect/platform-node/dist/esm/index.js
./src/app/action.ts
01E30475-1030-469D-A40C-8FC917A0EDB1_IN
01E30475-1030-469D-A40C-8FC917A0EDB1_OUT
04756D81-F81F-46E2-898C-2D5120B587B4_IN
04756D81-F81F-46E2-898C-2D5120B587B4_OUT
07F949C4-B4F4-499D-8C39-D23BAA55914C_IN
07F949C4-B4F4-499D-8C39-D23BAA55914C_OUT
0B04105C-E951-4D1C-A857-50A818BF7996_IN
0B04105C-E951-4D1C-A857-50A818BF7996_OUT
0B0B6B7D-1A8B-498B-99EF-FA9D87E45C82_IN
...
In older-no-errorsbranch, with "@effect/platform-node": "0.45.1":
This is a known bug with Next.js and SWC. The syntax error it is failed on is, in fact, valid. Maybe this is helpful for your case: nodejs/undici#2954 (comment)
I'd also suggest to report this in the Next.js issue queue.
What version of Effect is running?
2.4.18
What steps can reproduce the bug?
Created a minimal repro here: https://github.com/stratospark/next-effect-fs-bug
Run the server:
npm run dev
orbun --bun run dev
.Open http://localhost:3000. Click the only button and watch the server console for errors.
What is the expected behavior?
Should output a list of files from
/tmp
What do you see instead?
In
main
branch, with "@effect/platform-node": "^0.45.28",In
errors-but-still-works
branch, with "@effect/platform-node": "0.45.14":In
older-no-errors
branch, with "@effect/platform-node": "0.45.1":Additional information
Version of next: "next": "14.1.4"
The text was updated successfully, but these errors were encountered: