next.js: r.isMemo is not a function
Bug report
Describe the bug
after doing the deploy with now I get error 500. in the now logs I have seen this error r.isMemo is not a function. in debug this function if it exists and no error has been obtained.
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
- run -
now - run -
now log <domain | alias>

System information
- macOS
- Browser all
- Version of Next.js 7.0.2
- Now version 13.1.2-canary.3
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 36 (13 by maintainers)
Thank you very much @sebastiansson, because of your reproduction it was trivial to pinpoint the actual issue (took me 10 minutes). This is a great example of why providing a clear reproduction gets your issue solved faster 🙏
I’ve just tagged a new canary release holding the fix, it will take ~15-20 minutes for it to become available on npm because of test runs etc.
Once it’s available use this comment to upgrade your application: https://github.com/zeit/next.js/issues/5750#issuecomment-451607604
@timneutkens
I’m experiencing the same issue. I created a repo and deployed it with Now. I made it with
npx create-next-app --example with-redux-wrapperThe breaking seems to happen when I update the dependencies in my package.json file.Working versions on Now https://next-ismemo-hoyaaj0kt.now.sh (commit) https://next-ismemo-1ejnp2zr8.now.sh (commit)
Broken version on Now https://next-ismemo-i7l0sp7lo.now.sh/ (commit).
See the log file below for information about the broken https://next-ismemo-i7l0sp7lo.now.sh deployment in Now. broken_logs.txt
@machester4 Having the same issue and I’m not sure why, also in
../pages/index.js. Mind sharing yourpackage.json? Here’s mine:Just to check in here again, this has been released under stable 🙏
@sebastiansson Happy to 🙏
Re debugging: So you can run
next buildlocally and it will output the serverless page bundles in.next/serverless/pages, then you can run the bundle using a simple Node.js HTTP server as described here: https://github.com/zeit/next.js#one-level-lowerWith relation to how I knew what was going on, I knew that we added
react-isto the dependencies of Next.js in the canary branch,isMemosounded like something coming from there, so it made sense to check there. Then I noticed how there was no isMemo in the version of react-is that Next.js has so I noticed it must have been something in module resolution. I remembered another open issue related to module resolving with Next.js node_modules taking priority so I checked the node_modules resolve rules and indeed it was causing the issue. So removing it solved both this issue and the other open issue.Pinning
react-reduxto4.4.9sorts it out for me, but is far from ideal.My app builds and runs fine in production mode on my machine with
react-reduxset to^6.0.0. But it fails with ther.isMemo...error when deploying tonow.Old versions of my app that I deployed with no problem, fail to be deploy to
nowat the moment. And they have ayarn.lockfile. So, as @paulogdm mentions here it could be a regression in a now builder.Everyone as slow as me, the solution for this problem is just to install: next@canary. Even with redux it works quite fine. Also with now 14. However check at this, as you need to fix this because of the necessary next upgrade: https://github.com/zeit/now-builders/blob/master/errors/now-next-no-serverless-pages-built.md
Did you upgrade to
next@canary?I’m not using
redux, but I’m still encountering this issue.Hey, I’m having a similar issue all of a sudden but with
n.isMemo is not a functionI don’t have redux though and it’s happened all of a sudden when I just updated some CSS on my project.
I can get it to work if I switch the now build from
@now/nextto@now/static-buildtemporarily.Any thoughts?