TypeError: Class extends value undefined is not a constructor or null
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, nuxtjs
Research direction
Start with the Nuxt 3 import in the .vue page or component and follow the stack trace through cybersource-rest-client.js, agent-base, https-proxy-agent, and ApiClient.js. Determine why http.Agent is undefined in this setup; done means the ApiClient import works without the reported TypeError.
Written by the indexing model from the issue text.
Description
I could be doing something silly, but when I've imported
import ApiClient from 'cybersource-plugin';
into my nuxt3 application in a .vue page or component I get the below error
which seems to be in the cybersource-rest-client.js file where the Agent class extends http.Agent
TypeError: Class extends value undefined is not a constructor or null
at node_modules/cybersource-rest-client/node_modules/agent-base/dist/index.js (cybersource-rest-client.js?v=6b63f3c9:2676:36)
at __require2 (chunk-WGAPYIUP.js?v=6b63f3c9:19:50)
at node_modules/cybersource-rest-client/node_modules/https-proxy-agent/dist/index.js (cybersource-rest-client.js?v=6b63f3c9:2941:24)
at __require2 (chunk-WGAPYIUP.js?v=6b63f3c9:19:50)
at cybersource-rest-client.js?v=6b63f3c9:57284:68
at node_modules/cybersource-rest-client/src/ApiClient.js (cybersource-rest-client.js?v=6b63f3c9:57291:7)
at __require2 (chunk-WGAPYIUP.js?v=6b63f3c9:19:50)
at cybersource-rest-client.js?v=6b63f3c9:161311:35
at node_modules/cybersource-rest-client/src/index.js (cybersource-rest-client.js?v=6b63f3c9:161313:7)
at __require2 (chunk-WGAPYIUP.js?v=6b63f3c9:19:50)
- Dominant language
- JavaScript
- Stars
- 43
- Forks
- 66
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 1
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from CyberSource/cybersource-rest-samples-node
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
CyberSource/cybersource-rest-samples-node#72 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
CyberSource/cybersource-rest-samples-node#66 · 5 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
CyberSource/cybersource-rest-samples-node#58 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 20/100
All issues in CyberSource/cybersource-rest-samples-node
Similar issues
-
[APP/MODULE]Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
awesome-android-root/awesome-android-root#195 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
subhranshudash13-dotcom/Contribo#74 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
qq15725/modern-screenshot#174 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 67/100
ThatGuySam/doesitarm#1114 ·