Visitar URL original
Module not found: Can't resolve 'unfetch' · Issue #172 · developit/unfetch · GitHub
Skip to content

Module not found: Can't resolve 'unfetch' #172

Open

Description

@tungrix

I have followed the official instruction to install unfetch npm i unfetch; however, when I import fetch from 'unfetch', Module not found: Can't resolve 'unfetch' pop out, I am using latest version of Next.js.

Activity

  1. asins commented on Jul 23, 2023

    @asins

    I also had the same issue and the solution was to change the 'exports' in the 'package.json' file to the following:

      "exports": {
        ".": {
          "import": "./dist/unfetch.mjs",
          "default": "./dist/unfetch.js"
        },
  2. waringr commented on Dec 8, 2023

    @waringr

    At the risk of asking a dumb question, is that my package.json, or the one from isomorphic-unfetch? TIA

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions