-
Notifications
You must be signed in to change notification settings - Fork 30
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
Module not found: Can't resolve 'next/dist/shared/lib/router-context' #88
Comments
Got the same problem and yes, @robatronPrime solution is really working. I tried to use Webpack config to add alias
but it doesn't work... |
Provided a fix, your next version was set to latest, when checking the next version the plugin checked for a number, and omitted 'latest' string, setting ur Router Context path to old, resulting in this problem If you need a quick solution for a cloud deployment like heroku or netlify just use yarn/pnpm/npm install [email protected], fixes the issue |
Same problem for me. |
Maybe anyone had successfully solved the problem for the |
i have written a temporary solution, especialy if you need a quick fix for a cloud deployment just add this script in root directory.
from there, you just run it before build with node, and then everything should work as expected |
Bumping the thread. |
Have the same issue, bumping the thread. |
Hi! Sorry that it took so long, but I went through 3 intense months, and had to prioritize. |
In
[email protected]
therouter-context
file has changed name torouter-context.shared-runtime
.Changing the line at
./node_modules/next-translate-routes/react/withTranslateRoutes.js:38:0
fromvar router_context_1 = require("next/dist/shared/lib/router-context");
to
var router_context_1 = require("next/dist/shared/lib/router-context.shared-runtime");
fixes the issue.
However, it would be cool if it new which version of next was being used and changed the import depending on the next version?
The text was updated successfully, but these errors were encountered: