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
/Users/rishi/Projects/mcpx-openai-chat/index.js:2 import { McpxOpenAI } from "@dylibso/mcpx-openai"; ^^^^^^
SyntaxError: Cannot use import statement outside a module at internalCompileFunction (node:internal/vm:77:18) at wrapSafe (node:internal/modules/cjs/loader:1288:20) at Module._compile (node:internal/modules/cjs/loader:1340:27) at Module._extensions..js (node:internal/modules/cjs/loader:1435:10) at Module.load (node:internal/modules/cjs/loader:1207:32) at Module._load (node:internal/modules/cjs/loader:1023:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12) at node:internal/main/run_main_module:28:49
For now, in order to fix it and run, I added type as module in package.json and renamed index.js to index.mjs (i guess either should work?)
Apologies i never got back to this thread. I think we were backchanneling. I think should be able to upgrade node or change the file extension to .mjs. I'm going to see about changing the example so it works with all versions of node.
For now, in order to fix it and run, I added type as module in package.json and renamed index.js to index.mjs (i guess either should work?)
Node version is: v21.1.0
The text was updated successfully, but these errors were encountered: