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.

Module '"aws-amplify"' has no exported member 'JS'

See original GitHub issue

Before opening, please confirm:

JavaScript Framework

React Native

Amplify APIs

Authentication

Amplify Categories

auth

Environment information

# Put output below this line
System:
    OS: macOS High Sierra 10.13.6
    CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
    Memory: 256.95 MB / 16.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 14.15.0 - /usr/local/bin/node
    Yarn: 1.19.2 - /usr/local/bin/yarn
    npm: 6.14.8 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 107.0.5304.110
    Chrome Canary: 110.0.5442.0
    Firefox: 76.0.1
    Safari: 13.1.2
  npmPackages:
    @babel/core: ^7.12.9 => 7.20.2 (7.9.0)
    @expo/vector-icons: ^13.0.0 => 13.0.0 
    @expo/webpack-config: ^0.17.2 => 0.17.3 
    @react-native-picker/picker: ^2.4.8 => 2.4.8 
    @react-navigation/bottom-tabs: ^6.0.5 => 6.4.1 
    @react-navigation/native: ^6.0.2 => 6.0.14 
    @react-navigation/native-stack: ^6.1.0 => 6.9.2 
    @types/react: ~18.0.24 => 18.0.25 
    @types/react-native: ~0.70.6 => 0.70.7 
    HelloWorld:  0.0.1 
    aws-amplify: ^5.0.4 => 5.0.4 
    aws-amplify-react-native: ^7.0.1 => 7.0.1 
    expo: ~47.0.8 => 47.0.8 
    expo-asset: ~8.6.2 => 8.6.2 
    expo-constants: ~14.0.2 => 14.0.2 
    expo-font: ~11.0.1 => 11.0.1 
    expo-linking: ~3.2.3 => 3.2.3 
    expo-splash-screen: ~0.17.5 => 0.17.5 
    expo-status-bar: ~1.4.2 => 1.4.2 
    expo-system-ui: ~2.0.1 => 2.0.1 
    expo-web-browser: ~12.0.0 => 12.0.0 
    hermes-inspector-msggen:  1.0.0 
    jest: ^26.6.3 => 26.6.3 
    jest-expo: ~47.0.1 => 47.0.1 
    react: 18.1.0 => 18.1.0 
    react-dom: 18.1.0 => 18.1.0 
    react-native: 0.70.5 => 0.70.5 
    react-native-safe-area-context: 4.4.1 => 4.4.1 
    react-native-screens: ~3.18.0 => 3.18.2 
    react-native-web: ~0.18.9 => 0.18.10 
    react-test-renderer: 18.1.0 => 18.1.0 
    typescript: ^4.6.3 => 4.9.3 
  npmGlobalPackages:
    @aws-amplify/cli: 0.1.27
    appium: 1.6.3
    awsmobile-cli: 1.1.5
    bower: 1.7.9
    coffee-script: 1.9.0
    create-react-app: 0.6.0
    create-react-native-app: 2.0.2
    create-react-native-module: 0.13.0
    create-react-native-web-app: 0.1.6
    eas-cli: 0.47.0
    ember-cli: 0.2.7
    eslint-plugin-react: 6.7.1
    eslint: 3.11.1
    exp: 57.2.1
    expo-cli: 5.1.1
    generator-rn-toolbox: 3.1.1
    grunt-cli: 0.1.13
    karma-cli: 0.0.4
    n: 2.1.8
    nodemon: 1.3.7
    npm: 6.14.8
    protractor: 1.6.1
    react-native-cli: 1.3.0
    react-native-contacts-wrapper: 0.2.4
    react-native-rename: 2.0.4
    react: 16.12.0
    spawn-sync: 1.0.11
    typescript: 1.8.9
    undefined: 0.1.0
    webpack-dev-server: 1.16.2
    webpack: 1.13.3
    yo: 2.0.0

Describe the bug

In AWS Amplify version 5, JS export was removed from @aws-amplify/core.

However, aws-amplify-react-native@7.0.1 is expecting the JS module. /aws-amplify-react-native/src/Auth/AuthPiece.tsx.

The missing module is crashing my React Native app. My temporary solution is to go back to aws-amplify@4.4.43.

Expected behavior

Expect @aws-amplify/core to export JS.

Reproduction steps

yarn add aws-amplify aws-amplify-react-native

Code Snippet

App.tsx

// Put your code below this line.
import { Amplify } from 'aws-amplify'
import { withAuthenticator } from "aws-amplify-react-native";
import config from './aws-exports';
Amplify.configure(config);

function App() {
  return(<Text>Hello World!</Text>);
}

export default withAuthenticator(App, { includeGreetings: true });

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
hszetocommented, Nov 29, 2022

@tannerabread It’s working! thank you! thank you everyone.

2reactions
jimblanccommented, Dec 6, 2022

@hszeto Fix has been released and is available in aws-amplify@5.0.5

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module has no exported member 'AWS' - Stack Overflow
I believe that the reason that the aws-sdk has no default export is because they want developers to only import the packages they...
Read more >
@aws-amplify/ui-components - npm
The '@aws-amplify/ui-components' package has been deprecated. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify ...
Read more >
Amplify UI's new Authenticator component makes it easy to ...
In this blog post we will deploy a React app with Amplify Hosting, set up auth, and then integrate the <Authenticator> UI component...
Read more >
Modular imports with AWS Amplify - Nader Dabit
The latest release of AWS Amplify now includes modular imports. Let's take a look at what this means in terms of implementation &...
Read more >
Authentication - Getting started - JavaScript - AWS Amplify Docs
Amazon Cognito is a robust user directory service that handles user registration, authentication, account recovery & other operations. In this tutorial, you'll ...
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