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
library next-translate-routes didnt work ,i got error like this ===>Module not found: Can't resolve 'next/dist/shared/lib/router-context' https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next-translate-routes/index.js
./pages/_app.tsx
Using external babel configuration from /Users/bogdan/Documents/work/landing/.babelrc.js
⨯ ./node_modules/next-translate-routes/react/withTranslateRoutes.js:38:1
Module not found: Can't resolve 'next/dist/shared/lib/router-context' https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next-translate-routes/index.js
./pages/_app.tsx
GET / 500 in 7289ms
Here is the diff that solved my problem:
diff --git a/node_modules/next-translate-routes/react/withTranslateRoutes.js b/node_modules/next-translate-routes/react/withTranslateRoutes.js
index f9d2804..e2cff27 100644
--- a/node_modules/next-translate-routes/react/withTranslateRoutes.js+++ b/node_modules/next-translate-routes/react/withTranslateRoutes.js@@ -35,7 +35,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.withTranslateRoutes = void 0;
-var router_context_1 = require("next/dist/shared/lib/router-context");+// var router_context_1 = require("next/dist/shared/lib/router-context");+var router_context_1 = require("next/dist/shared/lib/router-context.shared-runtime");
var router_1 = require("next/router");
var react_1 = __importStar(require("react"));
var ntrData_1 = require("../shared/ntrData");
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.library next-translate-routes didnt work ,i got error like this ===>Module not found: Can't resolve 'next/dist/shared/lib/router-context'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next-translate-routes/index.js
./pages/_app.tsx
Using external babel configuration from /Users/bogdan/Documents/work/landing/.babelrc.js
⨯ ./node_modules/next-translate-routes/react/withTranslateRoutes.js:38:1
Module not found: Can't resolve 'next/dist/shared/lib/router-context'
https://nextjs.org/docs/messages/module-not-found
Import trace for requested module:
./node_modules/next-translate-routes/index.js
./pages/_app.tsx
GET / 500 in 7289ms
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: