Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i keep getting this error while using it in my next13 app #113

Open
geraldAp opened this issue Oct 19, 2023 · 3 comments
Open

i keep getting this error while using it in my next13 app #113

geraldAp opened this issue Oct 19, 2023 · 3 comments

Comments

@geraldAp
Copy link

Unhandled Runtime Error
Error: Cannot read properties of undefined (reading 'prototype')

Call Stack
prototype
node_modules\react-responsive-masonry\lib\Masonry\index.js (14:94)
_inheritsLoose
node_modules\react-responsive-masonry\lib\Masonry\index.js (19:2)
_react
node_modules\react-responsive-masonry\lib\Masonry\index.js (86:2)
(rsc)/./node_modules/react-responsive-masonry/lib/Masonry/index.js
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/vendor-chunks/react-responsive-masonry.js (20:1)
webpack_require
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/webpack-runtime.js (33:43)
require
node_modules\react-responsive-masonry\lib\index.js (6:38)
(rsc)/./node_modules/react-responsive-masonry/lib/index.js
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/vendor-chunks/react-responsive-masonry.js (40:1)
webpack_require
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/webpack-runtime.js (33:43)
eval
webpack-internal:///(rsc)/./src/app/gallery/[slug]/components/MasonaryGallery.tsx (9:82)
(rsc)/./src/app/gallery/[slug]/components/MasonaryGallery.tsx
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/app/gallery/[slug]/page.js (294:1)
webpack_require
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/webpack-runtime.js (33:43)
eval
webpack-internal:///(rsc)/./src/app/gallery/[slug]/page.tsx (13:85)
(rsc)/./src/app/gallery/[slug]/page.tsx
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/app/gallery/[slug]/page.js (305:1)
Function.webpack_require
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/.next/server/webpack-runtime.js (33:43)
async ek
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (11:455662)
async tH
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:11134)
async
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:13183)
async tH
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:12950)
async
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:13183)
async tH
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:12950)
async
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:13183)
async tH
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js (13:12950)
async
file:///C:/Users/amank/OneDrive/Desktop/work-projects/delexis/node_modules/next/dist/compiled/next-server/app-page.runtime.dev.js

@PatrykWojcieszak
Copy link

PatrykWojcieszak commented Oct 22, 2023

Adding "use client"; at the top of your component is fixing this issue

@ln-dev7
Copy link

ln-dev7 commented Nov 8, 2023

Adding "use client"; at the top of your component is fixing this issue

Thanks so much !!!

@Digitl-Alchemyst
Copy link

This did not work as a fix for me as I am trying to use it in a server component that fetches and caches data. I wasn't able to get it to work tried moving it into its own component but got various errors there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants