Skip to content

Commit df591e1

Browse files
authored
docs(js): fix predictions setup example (#8153)
* fix predictions front end configuration example * update pkg installation
1 parent 0dfff00 commit df591e1

File tree

1 file changed

+3
-3
lines changed
  • src/pages/[platform]/build-a-backend/add-aws-services/predictions/set-up-predictions

1 file changed

+3
-3
lines changed

src/pages/[platform]/build-a-backend/add-aws-services/predictions/set-up-predictions/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,21 @@ backend.addOutput({
145145
To install the Amplify library to use predictions features, run the following commands in your project's root folder:
146146

147147
```bash title="Terminal" showLineNumbers={false}
148-
npm add aws-amplify
148+
npm add aws-amplify @aws-amplify/predictions
149149
```
150150

151151
## Configure the frontend
152152

153153
Import and load the configuration file in your app. It is recommended you add the Amplify configuration step to your app's root entry point. For example `main.ts` in React and Angular.
154154

155155
```ts title="src/main.ts"
156-
import { Predictions } from "aws-amplify/predictions";
156+
import { Amplify } from "aws-amplify";
157157
import outputs from "./amplify_outputs.json";
158158

159159
Amplify.configure(outputs);
160160

161161
Amplify.configure({
162162
...Amplify.getConfig(),
163-
Predictions: config.custom.Predictions,
163+
Predictions: outputs.custom.Predictions,
164164
});
165165
```

0 commit comments

Comments
 (0)