AWS Amplify predictions gives - No Auth module registered in Amplify - error
See original GitHub issuethis code
import logo from "./logo.svg";
import { useEffect } from "react";
import "./App.css";
import { AmplifyAuthenticator, AmplifySignOut } from "@aws-amplify/ui-react";
import Amplify from "@aws-amplify/core";
import Predictions, {
AmazonAIPredictionsProvider,
} from "@aws-amplify/predictions";
import awsconfig from "./aws-exports";
Amplify.configure(awsconfig);
Amplify.register(Predictions);
//Amplify.addPluggable(new AmazonAIPredictionsProvider());
Predictions.addPluggable(new AmazonAIPredictionsProvider());
function App() {
useEffect(() => {
Predictions.identify({
labels: {
source: {
S3Object: {
Bucket: "swarovski61482523a3d849c6b5a2943c8b1e09a3120715-dev",
Name: "huis.jpg",
},
},
// projectVersionArn:
// "arn:aws:rekognition:eu-west-1:666139602712:project/Pandora/version/Pandora.2020-10-27T17.04.51/1603814691469",
type: "ALL",
},
})
.then((response) => {
console.log(response);
// const { labels } = response;
// labels.forEach((object) => {
// const { name, boundingBoxes } = object;
// });
})
.catch((err) => console.log({ err }));
});
return (
<AmplifyAuthenticator>
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
</AmplifyAuthenticator>
);
}
export default App;
with this package
{
"name": "predictions",
"version": "0.1.0",
"private": true,
"dependencies": {
"@aws-amplify/core": "^3.8.5",
"@aws-amplify/ui-react": "^0.2.30",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"react-scripts": "4.0.1",
"web-vitals": "^0.2.4"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
This gives me a No Auth module registered in Amplify error
I already remove node modules and lock files and did reinstalls.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Troubleshooting - Upgrading Amplify packages - JavaScript
No Auth module registered in Amplify. To prevent this situation, you can Check for duplicate versions, and if duplicate versions exists, then Upgrade...
Read more >Troubleshooting Amplify identity and access
Use the following information to help you diagnose and fix common issues that you might encounter when working with Amplify and IAM. If...
Read more >@aws-amplify/core | Yarn - Package Manager
Connect your app with machine learning services like NLP, computer vision, TTS, and more. Predictions utilizes a range of Amazon's Machine Learning services, ......
Read more >Module not found: Can't resolve '@aws-amplify/analytics'
I get a similar error. Failed to compile. ./node_modules/aws-amplify-react/lib-esm/Analytics/trackLifecycle.js Module not found: Can't ...
Read more >amplify-js
AWS Amplify goes well with any JavaScript based frontend workflow and React Native for mobile developers. Our default implementation works with Amazon Web ......
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 FreeTop 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
Top GitHub Comments
Ok let me check tomorrow. I am making some changes to the core of the predictions packages in amplify-js so it supports custom labels api. Therefor I used other params
Sorry, it had to do with running amplify-js locally.
I had not linked the whole framework but just predictions package