You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this error that originates from the dexie-react-hooks package whenever I try to import it in my Next.js 12 app:
Error: require() of ES Module C:\Users\nsdjs\Documents\Programming\websites\ramble\node_modules\dexie\dist\modern\dexie.mjs not supported.
Instead change the require of C:\Users\nsdjs\Documents\Programming\websites\ramble\node_modules\dexie\dist\modern\dexie.mjs to a dynamic import() which is available in all CommonJS modules.
Call Stack:
<unknown>
file:///C:/Users/nsdjs/Documents/Programming/websites/ramble/node_modules/dexie-react-hooks/dist/dexie-react-hooks.js (2:85)
Object.<anonymous>
file:///C:/Users/nsdjs/Documents/Programming/websites/ramble/node_modules/dexie-react-hooks/dist/dexie-react-hooks.js (5:2)
Object.dexie-react-hooks
file:///C:/Users/nsdjs/Documents/Programming/websites/ramble/.next/server/pages/index.js (52:18)
__webpack_require__
and so on...
Note: The latest version of dexie-react-hooks (version 1.1.3) gives better nextjs support - no need to dynamically import components or check for SSR within your queries - just use the vanilla react samples and import components normally.
I get this error that originates from the
dexie-react-hooks
package whenever I try to import it in my Next.js 12 app:Here's the code sample that triggered this:
Any ideas how to fix this? I'm using the latest versions of both
dexie
anddexie-react-hooks
.The text was updated successfully, but these errors were encountered: