microsoft / microsoft/AdaptiveCards
3.0.5 throws when loaded with ES6 imports
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2k
- Forks
- 595
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 1
Description
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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure with the shown package.json and import under Node.js. Inspect the published adaptivecards/lib/adaptivecards.js import and the missing lib/strings resolution; done means the ES6 import creates an AdaptiveCard without ERR_MODULE_NOT_FOUND.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100