S3 is not a constructor & Observable is not a constructor ERRORS
See original GitHub issueProblem:
I was using Storage and subscription well on React Native, but now it doesn’t work with same codes. It rejects with
S3 is not a constructor
for Storage,
Observable is not a constructor
for Subscription (Queries and mutations working well.)
Packages:
"react": "16.9.0",
"react-native": "0.61.2",
"amazon-cognito-identity-js": "3.1.3",
"aws-amplify": "1.2.3",
"aws-amplify-react-native": "2.2.3",
Codes:
import awsconfig from './aws-exports';
import Amplify, {Storage} from 'aws-amplify';
Amplify.configure(awsconfig);
export const ImageDownloader = fileName => {
return Storage.get(fileName, {track: true});
};
Issue Analytics
- State:
- Created 4 years ago
- Reactions:3
- Comments:13 (4 by maintainers)
Top Results From Across the Web
TypeError: "x" is not a constructor - JavaScript - MDN Web Docs
The JavaScript exception "is not a constructor" occurs when there was an attempt to use an object or a variable as a constructor,...
Read more >TypeError: AWS.S3 is not a constructor - Stack Overflow
had to change my code to import * as dotenv from 'dotenv'; import * as path from 'path'; import * as fs from...
Read more >TypeError: Convert is not a constructor - The Observable Forum
I was trying to use the standard example from ansi-to-html npm packae. var Convert = require('ansi-to-html'); var convert = new Convert(); ...
Read more >Aws-sdk problems - Forge
Gives the 'is not a constructor' error. aws-sdk v2: import S3 from 'aws-sdk/clients/s3'; const s3 = new S3({region: 'eu-west-2', ...
Read more >Node.js v19.3.0 Documentation
readyState; DEP0005: Buffer() constructor; DEP0006: child_process options. ... No require , exports , or module.exports; No __filename or __dirname; No ...
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
The fix has reached into a stable release. @adamsythe, github automatically closes the issue when tagged with
fixes
directive, and our master commits go to unstable release (automatically) but not to stable releasesThis issue has been automatically locked since there hasn’t been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server
*-help
channels or Discussions for those types of questions.