Skip to content

Cannot find module 'node_modules/next/link' imported from /node_modules/@chakra-ui/next-js #7363

Description

@aaronpurewal

Description

When I deploy my website to Vercel using the new 'Link' component from @chakra-ui/nextjs, the build fails and I receive an error.

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/vercel/path0/node_modules/next/link' imported from /vercel/path0/node_modules/@chakra-ui/next-js/dist/chunk-LYWO3SBR.mjs

  • Did you mean to import next/link.js?
  1. Is it supposed to be pulling link.js? For some reason it is failing to find it and pull it.

Was able to test and manually change the path to 'next/link.js', along with the 'next/navigation' import to 'navigation.js', but then I received this error: "Server Error TypeError: createCache is not a function"

Link to Reproduction

Steps to reproduce

No response

Chakra UI Version

2.5.1

Browser

Chrome

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions