Closed sivaprakash-mu closed 5 months ago
I've upgraded my nextjs to the latest version now, but I still get this error
@sivaprakash-mu , thanks for bringing this up and we are looking into the issue.
The UI builder team is aware of it and working on the issue. We will transfer the issue.
Hi @sivaprakash-mu, the Figma plugin has been updated. You should no longer encounter this error after you downloading the components once again via the plugin. Could you please confirm if that works for you?
Hello @zchenwei, thank you very much. This works now! The error does not happen anymore.
Cheers, Prakash.
Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Before creating a new issue, please confirm:
On which framework/platform are you having an issue?
React
Which UI component?
Primitive components
How is your app built?
Next.js Gen2 Template
What browsers are you seeing the problem on?
Chrome
Which region are you seeing the problem in?
ca-Central-1
Please describe your bug.
I installed my Next.JS (app router) starter app, from the Amplify Gen2 template (todo), and then I subscribed to figma dev mode, and downloaded the UI components from AWS Amplify UI kit.
Then I added the UI components to the app in the ui-components folder in the project folder. Then I added a navigation bar, using the Amplify UI kit template. Then I get a runtime error in the LogoWithText.jsx component.
1 of 1 unhandled error Next.js (13.5.4) is outdated (learn more)
Unhandled Runtime Error TypeError: (0 , _aws_amplify_ui_react_internal__WEBPACK_IMPORTED_MODULE_2__.getOverridesFromVariants) is not a function
Source ui-components/LogoWithText.jsx (311:29) @ variants
309 | 310 | const overrides = mergeVariantsAndOverrides(
What's the expected behaviour?
The app should load with the Navigator that I have added.
Help us reproduce the bug!
I installed my Next.JS (app router) starter app, from the Amplify Gen2 template (todo), and then I subscribed to figma dev mode, and downloaded the UI components from AWS Amplify UI kit.
Then I added the UI components to the app in the ui-components folder in the project folder. Then I added a navigation bar, using the Amplify UI kit template. Then I get a runtime error in the LogoWithText.jsx component.
Code Snippet
Added Navigation in the layout.tsx file
import type { Metadata } from "next"; import { Inter } from "next/font/google"; import "./app.css"; import Navigation from "@/components/navigation/Navigation";
const inter = Inter({ subsets: ["latin"] });
export const metadata: Metadata = { title: "Create Next App", description: "Generated by create next app", };
export default function RootLayout({ children, }: { children: React.ReactNode; }) { return (
); }
Navigation.jsx file
"use client" import { Flex, Text, Image } from '@aws-amplify/ui-react'; import { LogoWithText, MyIcon } from '@/ui-components'; export default function Navigation() { return ( <Flex gap="40px" direction="row" width="1440px" justifyContent="center" alignItems="center" position="relative" boxShadow="0px 2px 6px rgba(0.05098039284348488, 0.10196078568696976, 0.14901961386203766, 0.15000000596046448)" padding="24px 32px 24px 32px" backgroundColor="rgba(255,255,255,1)"
Console log output
NA
Additional information and screenshots
No response