adobe / adobe/acc-js-sdk

Error with package dependency

Open
#75 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
27
Forks
25
PR merge metrics
No merged PRs in 30d

Description

### Description

JSDOM is one of the dependencies of adobe/acc-js-sdk package which I am using to make connection to Adobe Campaign in a cdk project. While deploying the application using 'cdk deploy' there is a build error for /xhr-sync-worker.js which occurs at the location node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js

### Expected Behaviour

Application building successfully

### Actual Behaviour

An error with JSDOM

```
ERROR Uncaught Exception {
"errorType": "Runtime.ImportModuleError",
"errorMessage": "Error: Cannot find module './xhr-sync-worker.js'\nRequire stack:\n- /var/task/index.js\n- /var/runtime/index.mjs",
"stack": [
"Runtime.ImportModuleError: Error: Cannot find module './xhr-sync-worker.js'",
"Require stack:",
"- /var/task/index.js",
"- /var/runtime/index.mjs",
" at _loadUserApp (file:///var/runtime/index.mjs:1000:17)",
" at async Object.UserFunction.js.module.exports.load (file:///var/runtime/index.mjs:1035:21)",
" at async start (file:///var/runtime/index.mjs:1200:23)",
" at async file:///var/runtime/index.mjs:1206:1"
]
}
```

#### Platform and Version

"aws-cdk-lib": "2.35.0"
"@adobe/acc-js-sdk": 1.1.17

#### Sample Code that illustrates the problem

const adobe = require("@adobe/acc-js-sdk");

Don't really know if the issue is with this package or the JSDOM package

Thanks in advance

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with `cdk deploy` using aws-cdk-lib 2.35.0 and @adobe/acc-js-sdk 1.1.17. Inspect node_modules/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js and the deployment bundle around the missing ./xhr-sync-worker.js module. Done means identifying whether the SDK or JSDOM causes the packaging failure and confirming the application builds and deploys without the Runtime.ImportModuleError.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript
Domain
backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.