-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
Description
Description
When running opencode-cli.exe auth login on Windows, selecting "OpenCode Zen" provider causes an error:
error: Cannot find module '@openauthjs/openauth/pkce' from 'C:\Users\...\.cache\opencode\node_modules\opencode-anthropic-auth\index.mjs'
Root Cause
The @openauthjs/openauth package (version 0.4.3) has an incomplete npm release:
package.jsondeclares exports:"./*": { "import": "./dist/esm/*.js" }- But the
dist/esm/directory does not exist in the published package - Only
dist/types/andsrc/are present
When opencode-anthropic-auth tries to import from @openauthjs/openauth/pkce, module resolution fails.
Environment
- OS: Windows 11 x64
- OpenCode CLI version: 1.0.164 (from desktop installer at
D:\OpenCode) - Also reproduced with pnpm-installed
[email protected]
Workaround
Manually create the missing file at:
~/.cache/opencode/node_modules/@openauthjs/openauth/dist/esm/pkce.js
With a self-contained PKCE implementation (base64url encode + SHA-256 challenge generation).
Suggested Fix
Either:
- Pin
@openauthjs/openauthto a version that includesdist/esm/in the published package - Or update
opencode-anthropic-authto use a different import path that exists
🤖 Generated with Claude Code