TypeError: Class extends value undefined is not a constructor or null in @aws-sdk/client-cloudwatch-events
See original GitHub issueDescribe the bug
On using 3.53.0 version of “@aws-sdk/client-*” packages, we are getting the following error on running our tests:
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/models/CloudWatchEventsServiceException.js:5:64)
at Object.<anonymous> (node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/models/models_0.js:7:44)
Your environment
SDK version number
@aws-sdk/client-cloudwatch-events@3.53.0
Is the issue in the browser/Node.js/ReactNative?
Node.js
Details of the browser/Node.js/ReactNative version
Paste output of npx envinfo --browsers
or node -v
or react-native -v
npx envinfo --browsers
Browsers:
Chrome: 98.0.4758.109
Firefox: 91.6.0
Safari: 15.3
node -v
v16.13.1
Steps to reproduce
On running lerna bootstrap and npm watch, tests fail
Observed behavior
FAIL packages/lambda/test/api/schema.unit.ts
● Test suite failed to run
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/models/CloudWatchEventsServiceException.js:5:64)
at Object.<anonymous> (node_modules/@aws-sdk/client-cloudwatch-events/dist-cjs/models/models_0.js:7:44)
Expected behavior
Tests should pass
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Contents of CloudWatchEventsServiceException.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CloudWatchEventsServiceException = void 0;
const smithy_client_1 = require("@aws-sdk/smithy-client"); <--- CODE BREAKING HERE
class CloudWatchEventsServiceException extends smithy_client_1.ServiceException {
constructor(options) {
super(options);
Object.setPrototypeOf(this, CloudWatchEventsServiceException.prototype);
}
}
exports.CloudWatchEventsServiceException = CloudWatchEventsServiceException;
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Class extends value undefined is not a function or null - Stack ...
I am getting the following error when trying to create these entities. TypeError: Class extends value undefined is ...
Read more >TypeError: Class extends value undefined is not a ... - Drupal
Initial searching seems to imply that this indicates an issue with a circular dependency. Might have to be a separate issue, but there...
Read more >TypeError: Class extends value undefined is not a constructor ...
[moved to issue] Tutorial problem: TypeError: Class extends value undefined is not a constructor or null - Get Help and Help Others -...
Read more >typeerror class extends value undefined is not a constructor or ...
Web3 is not compatible with Typescript. Uncaught TypeError: Class extends value undefined is not a constructor or null at module.exports (keccak.js?e073:3) at ...
Read more >Class extends value #<Object> is not a constructor or null
I built a proxy server with netlify function. It worked well at local development environment. But after deployment, this error occurred. I'm not...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hey! I had the very same error and the culprit was duplicated dependencies
I had
smithy-client
version 3.49.0 alongside 3.55.0 There were many versions as each @aws-sdk sub-package would have its own@aws-sdk/smithy-client
I fixed it by updating all my
@aws-sdk
sub packages (i.e. client-sts, client-dynamodb) to the same latest version.This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.