-
Notifications
You must be signed in to change notification settings - Fork 28
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
error - ReferenceError: self is not defined while running in Next.js #40
Comments
@venkateshpullaganti You have to use dynamic imports to only import this library on the client side. Import the library like this: import dynamic from 'next/dynamic'
const AnimatedNumbers = dynamic(() => import('react-animated-numbers'), {
ssr: false,
}) |
@venkateshpullaganti Try editing it as @jedwardblack said. |
It worked. Thank you. 🤝 |
I think that this should be added to the readme, I just ran into the same issue. |
Hi,
Thank you for the awesome library. I loved it. 🤩
I am running into an issue while using in next.js. Could you help?
at Module._compile (internal/modules/cjs/loader.js:1085:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10) at Module.load (internal/modules/cjs/loader.js:950:32) at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Module.require (internal/modules/cjs/loader.js:974:19) at require (internal/modules/cjs/helpers.js:101:18) at Object.react-animated-numbers (/Users/venky/Wealthy/goku/.next/server/pages/index.js:1568:18) at __webpack_require__ (/Users/-----/.next/server/webpack-runtime.js:33:42) at eval (webpack-internal:///.
The text was updated successfully, but these errors were encountered: