export default function Cookies() {
return(
<>
</>
)
}
I am using React 18 and Next 14.0.2 with node v18.18.2 I've also tried with other versions of Node but the error continues.
When importing React Cookie Consent to a React component this error occurs:
node_modules/react-cookie-consent/dist/react-cookie-consent.esm.js (34:48) @ prototype
⨯ TypeError: Cannot read properties of undefined (reading 'prototype')
at webpack_require (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42)
at eval (./app/components/global/cookies/cookies.js:7:78)
at (rsc)/./app/components/global/cookies/cookies.js (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/app/page.js:261:1)
at webpack_require (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42)
at eval (./app/page.js:8:92)
at (rsc)/./app/page.js (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/app/page.js:312:1)
at Function.__webpack_require__ (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42)
at async Promise.all (index 0)
digest: "3892524330"
import CookieConsent from "react-cookie-consent";
export default function Cookies() { return( <> </> ) }
I am using React 18 and Next 14.0.2 with node v18.18.2 I've also tried with other versions of Node but the error continues. When importing React Cookie Consent to a React component this error occurs:
node_modules/react-cookie-consent/dist/react-cookie-consent.esm.js (34:48) @ prototype ⨯ TypeError: Cannot read properties of undefined (reading 'prototype') at webpack_require (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42) at eval (./app/components/global/cookies/cookies.js:7:78) at (rsc)/./app/components/global/cookies/cookies.js (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/app/page.js:261:1) at webpack_require (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42) at eval (./app/page.js:8:92) at (rsc)/./app/page.js (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/app/page.js:312:1) at Function.__webpack_require__ (/Users/exmode/Documents/tomas/Work/Harmonium/harmonium/.next/server/webpack-runtime.js:33:42) at async Promise.all (index 0) digest: "3892524330"
How can I fix this? Help.