question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

S3 is not a constructor & Observable is not a constructor ERRORS

See original GitHub issue

Problem:

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:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Amplifiyercommented, Oct 29, 2019

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 releases

0reactions
github-actions[bot]commented, Jun 12, 2021

This 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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found