Skip to content

Module not found: Can't resolve 'next/dist/shared/lib/router-context' #88

@robatronPrime

Description

@robatronPrime

In next@14.1.0 the router-context file has changed name to router-context.shared-runtime.

Changing the line at ./node_modules/next-translate-routes/react/withTranslateRoutes.js:38:0 from
var 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions