Skip to content

3.0.5 throws when loaded with ES6 imports #9155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rido-min opened this issue Apr 16, 2025 · 3 comments
Open

3.0.5 throws when loaded with ES6 imports #9155

rido-min opened this issue Apr 16, 2025 · 3 comments

Comments

@rido-min
Copy link
Member

Seems like there are some problems in 3.0.5, and wondering if there is any other issue to track.

repro steps:

{
  "type": "module",
  "dependencies": {
    "adaptivecards": "^3.0.5"
  }
}
import { AdaptiveCard} from 'adaptivecards';

const myCard = new AdaptiveCard();
console.log(myCard);

Fails with

node:internal/modules/esm/resolve:257
    throw new ERR_MODULE_NOT_FOUND(
          ^

Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'D:\source\adaptcards3test\node_modules\adaptivecards\lib\strings' imported from D:\source\adaptcards3test\node_modules\adaptivecards\lib\adaptivecards.js
    at finalizeResolution (node:internal/modules/esm/resolve:257:11)
    at moduleResolve (node:internal/modules/esm/resolve:913:10)
    at defaultResolve (node:internal/modules/esm/resolve:1037:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:650:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:599:25)
    at ModuleLoader.resolve (node:internal/modules/esm/loader:582:38)
    at ModuleLoader.getModuleJobForImport (node:internal/modules/esm/loader:241:38)
    at ModuleJob._link (node:internal/modules/esm/module_job:132:49) {
  code: 'ERR_MODULE_NOT_FOUND',
  url: 'file:///D:/source/adaptcards3test/node_modules/adaptivecards/lib/strings'
}

Node.js v22.11.0

Originally posted by @rido-min in #8319

@Nivedipa-MSFT
Copy link

@rido-min - Thanks for bringing this issue to our attention. Could you confirm if you are trying this in the Teams app?

@rido-min
Copy link
Member Author

We are using AdaptiveCards in the samples for the new Agents SDK, yes this is a sample for Teams, but I dont think it's relevant as the issue happens in any node app using ESM.

This was triggered by dependabot rasing this PR. microsoft/Agents-for-js#245 , and we could not take it since it will break our sample.

 

@rido-min
Copy link
Member Author

rido-min commented May 6, 2025

@Nivedipa-MSFT any updates?

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

No branches or pull requests

2 participants