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
Following the guide exactly, and using Node v22.9.0, I get the following error after running npx tsx agent.ts:
node:internal/modules/run_main:123
triggerUncaughtException(
^
Error: Transform failed with 2 errors:
/home/john/Development/langgraph-agent/agent.ts:26:24: ERROR: Top-level await is currently not supported with the "cjs" output format
/home/john/Development/langgraph-agent/agent.ts:35:23: ERROR: Top-level await is currently not supported with the "cjs" output format
at failureErrorWithLog (/home/john/Development/langgraph-agent/node_modules/esbuild/lib/main.js:1476:15)
at /home/john/Development/langgraph-agent/node_modules/esbuild/lib/main.js:755:50
at responseCallbacks.<computed> (/home/john/Development/langgraph-agent/node_modules/esbuild/lib/main.js:622:9)
at handleIncomingPacket (/home/john/Development/langgraph-agent/node_modules/esbuild/lib/main.js:677:12)
at Socket.readFromStdout (/home/john/Development/langgraph-agent/node_modules/esbuild/lib/main.js:600:7)
at Socket.emit (node:events:519:28)
at addChunk (node:internal/streams/readable:561:12)
at readableAddChunkPushByteMode (node:internal/streams/readable:512:3)
at Readable.push (node:internal/streams/readable:392:5)
at Pipe.onStreamRead (node:internal/stream_base_commons:189:23) {
name: 'TransformError'
}
Node.js v22.9.0
The error is simple to fix by restructuring the code to not use top-level awaits, but yeah... in the current state its not working if a user follows the examples as-is.
The text was updated successfully, but these errors were encountered:
While following the quickstart guide here:
https://langchain-ai.github.io/langgraphjs/tutorials/quickstart/#making-your-first-agent-using-langgraph
Following the guide exactly, and using Node v22.9.0, I get the following error after running
npx tsx agent.ts
:The error is simple to fix by restructuring the code to not use top-level awaits, but yeah... in the current state its not working if a user follows the examples as-is.
The text was updated successfully, but these errors were encountered: