#Issues importing { Auth } from aws-amplify

3 messages · Page 1 of 1 (latest)

solemn harbor
#

HELP!!! I want my web app to have a button only accessible to users inside of a group in my user pool.
When adding ' import { Auth } from 'aws-amplify'; ' whether on my main.js or app.vue I see a message on the browser console that reads: Uncaught SyntaxError: import not found: Auth App.vue:2:10.

I uninstalled and reinstalled amplify and other features but nothing changed, I get the same error regardless... Help would be appreciated.

loud depot
#

Auth is no longer exported from 'aws-amplify' on modern amplify - instead, use import * as Auth from "aws-amplify/auth";, or import just the parts you need, eg: import {signUp} from 'aws-amplify/auth

#

Your IDE should catch this