Currently, I am diving into learning NextJS and Chakra-UI. Following the installation of Chakra-UI and attempting to import it, I encountered the error message shown below on the page. Any assistance in resolving this issue would be greatly appreciated.
Server Error
TypeError: Cannot read properties of undefined (reading 'toLowerCase')
This error occurred during the page generation process. Any console logs will be displayed in the terminal window.
Call Stack
userAgentContains
file:///Users/dhineshbabumuthuraj/Documents/Dhineshbabu/learning/JavaScript/nextjs-apps/sample-nextjs-app1/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs (1470:25)
<unknown>
file:///Users/dhineshbabumuthuraj/Documents/Dhineshbabu/learning/JavaScript/nextjs-apps/sample-nextjs-app1/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs (1476:20)
ModuleJob.run
node:internal/modules/esm/module_job (218:25)
async ModuleLoader.import
node:internal/modules/esm/loader (329:24)
async importModuleDynamicallyWrapper
node:internal/vm/module (430:15)
import Layout from '../components/layout/layout';
import '../styles/globals.css';
import { ChakraProvider } from '@chakra-ui/react';
export default function App({ Component, pageProps }) {
<Layout>
<Component {...pageProps} />;
</Layout>
}
In my _app.js file, there is no usage of the component mentioned. However, the error arises immediately following the import statement.
Thank you, DHinesh