Skip to content

fix(teams): avoid ESM directory import for graph auth provider#121

Open
cipher416 wants to merge 1 commit intovercel:mainfrom
cipher416:fix/issue-113-esm-dir-import
Open

fix(teams): avoid ESM directory import for graph auth provider#121
cipher416 wants to merge 1 commit intovercel:mainfrom
cipher416:fix/issue-113-esm-dir-import

Conversation

@cipher416
Copy link

Fixes #113.

Node.js ESM does not support bare directory imports. The Teams adapter compiled output included:
\n- "@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials"\n
which throws ERR_UNSUPPORTED_DIR_IMPORT at runtime.

Change the import to the explicit file path:
\n- "@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js"\n
Validation:

  • Reproduced failure by installing @chat-adapter/teams in a fresh npm project and importing it via Node ESM.
  • Built @chat-adapter/teams and verified dist output contains the fixed path.
  • Packed and installed the tarball; import succeeds.

Also ran: pnpm check / pnpm fix (no changes).

@vercel
Copy link
Contributor

vercel bot commented Feb 26, 2026

@cipher416 is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ESM directory import fails at runtime — ERR_UNSUPPORTED_DIR_IMPORT

1 participant