Cannot find module @opencode-ai/sdk@latest when moduleResolution=nodenext #1138

Closed
opened 2026-02-16 17:29:36 -05:00 by yindo · 1 comment
Owner

Originally created by @zWingz on GitHub (Aug 6, 2025).

Originally assigned to: @thdxr on GitHub.

Image

My tsconfig declare moduleResolution=nodenext and the sdk's package.type was delcare as module in package.json, and It must be import file with .js extension

Image

It should change type to commonjs from module or append the extension with .js

Originally created by @zWingz on GitHub (Aug 6, 2025). Originally assigned to: @thdxr on GitHub. <img width="857" height="187" alt="Image" src="https://github.com/user-attachments/assets/551ea76d-14bd-4891-8dde-a1d534c54eae" /> My tsconfig declare `moduleResolution=nodenext` and the sdk's `package.type` was delcare as `module` in `package.json`, and It must be import file with `.js` extension <img width="876" height="169" alt="Image" src="https://github.com/user-attachments/assets/667d63d4-30e7-4187-814d-6e69f161ab33" /> It should change `type` to `commonjs` from `module` or append the extension with `.js`
yindo closed this issue 2026-02-16 17:29:36 -05:00
Author
Owner

@thdxr commented on GitHub (Aug 7, 2025):

we need to fix our build process

@thdxr commented on GitHub (Aug 7, 2025): we need to fix our build process
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1138