nuxt: After upgrading to nuxt3-rc2 Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.vite/deps/ufo.js?v=9947c87e' does not provide an export named 'isEqual'

Environment

  • Operating System: Linux
  • Node Version: v14.19.0
  • Nuxt Version: 3.0.0-rc.2-27530889.9e5a3cd
  • Package Manager: npm@8.4.1
  • Builder: vite
  • User Config: runtimeConfig, modules, buildModules, css, intlify, googleFonts
  • Runtime Modules: @formkit/nuxt@1.0.0-beta.7-ffbc354
  • Build Modules: @intlify/nuxt3@0.1.10, @pinia/nuxt@0.1.9

Reproduction

I have the error if I open any page.

Describe the bug

I have the bug in a browser console and seems like client-only part doesn’t work.

Additional context

No response

Logs

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 5
  • Comments: 26 (7 by maintainers)

Commits related to this issue

Most upvoted comments

This is still an issue on Nuxt 3.0.0-rc.3.

Fresh npm install after deleting package-lock.json and removing node_modules completely.

Error: Uncaught SyntaxError: The requested module '/_nuxt/node_modules/.vite/deps/ufo.js?v=3d76fa91' does not provide an export named 'isEqual' (at router.mjs:8:23)

From this line: import { withoutBase, isEqual } from "/_nuxt/node_modules/.vite/deps/ufo.js?v=3d76fa91";

UPDATE 1 I downgraded to Nuxt 3.0.0-rc.2 and deleted node_modules and package-lock.json and re-installed everything and the error has gone. So it’s definitely something in RC3.

UPDATE 2 As mentioned by @cdowning below, adding an override for the UFO dependency in package.json works with RC3 - though this is not ideal of course as it may break future updates.

"overrides": {
  "ufo": "^0.8.4"
}

@nuxtjs/tailwindcss Just release a new version and the issue is gone.

While this is not an issue with Nuxt 3, let’s keep the issue until at least the majority of deps migrate to the latest of ufo.

We probably also need to create some follow-up issues to ensure the chances of codependency mismatch are less.

Based on the above npm why reports, the reasons for ufo 0.7.x hosting are:

  • @nuxtjs/tailwindcss: Will released shortly
  • externality: /cc @danielroe can you please do the release?

Also /cc @antfu regarding Vueuse blocker for npm upgrade.

Same here, got the issue in rc-3, I didn’t use @nuxtjs/tailwindcss either.

yarn why ufo output:

=> Found "ufo@0.8.4"
info Has been hoisted to "ufo"
info Reasons this module exists
   - Hoisted from "@nuxt#schema#ufo"
   - Hoisted from "ohmyfetch#ufo"
   - Hoisted from "nuxt#ufo"
   - Hoisted from "nuxt#@nuxt#vite-builder#ufo"
   - Hoisted from "nuxt#nitropack#ufo"
info Disk size without dependencies: "64KB"
info Disk size with unique dependencies: "64KB"
info Disk size with transitive dependencies: "64KB"
info Number of shared dependencies: 0
=> Found "h3#ufo@0.8.3"
info This module exists because "nuxt#h3" depends on it.
info Disk size without dependencies: "64KB"
info Disk size with unique dependencies: "64KB"
info Disk size with transitive dependencies: "64KB"
info Number of shared dependencies: 0
=> Found "externality#ufo@0.7.11"
info This module exists because "nuxt#@nuxt#vite-builder#externality" depends on it.
info Disk size without dependencies: "60KB"
info Disk size with unique dependencies: "60KB"
info Disk size with transitive dependencies: "60KB"
info Number of shared dependencies: 0
=> Found "@nuxt/telemetry#ufo@0.7.11"
info Reasons this module exists
   - "nuxt#@nuxt#telemetry#ohmyfetch" depends on it
   - Hoisted from "nuxt#@nuxt#telemetry#ohmyfetch#ufo"
info Disk size without dependencies: "60KB"
info Disk size with unique dependencies: "60KB"
info Disk size with transitive dependencies: "60KB"
info Number of shared dependencies: 0
=> Found "nuxt-lodash#ufo@0.8.3"
info Reasons this module exists
   - "nuxt-lodash#@nuxt#kit#@nuxt#schema" depends on it
   - Hoisted from "nuxt-lodash#@nuxt#kit#@nuxt#schema#ufo"
info Disk size without dependencies: "64KB"
info Disk size with unique dependencies: "64KB"
info Disk size with transitive dependencies: "64KB"
info Number of shared dependencies: 0
=> Found "unstorage#ufo@0.8.3"
info This module exists because "nuxt#nitropack#unstorage" depends on it.
info Disk size without dependencies: "64KB"
info Disk size with unique dependencies: "64KB"
info Disk size with transitive dependencies: "64KB"
info Number of shared dependencies: 0
=> Found "@nuxt/telemetry#@nuxt/schema#ufo@0.8.3"
info This module exists because "nuxt#@nuxt#telemetry#@nuxt#kit#@nuxt#schema" depends on it.
info Disk size without dependencies: "64KB"
info Disk size with unique dependencies: "64KB"
info Disk size with transitive dependencies: "64KB"
info Number of shared dependencies: 0

Same here. Not resolvable by above steps and I got the feeling its because of tailwindcss which uses older ufo version.

node_modules/ufo
  ufo@"^0.7.11" from externality@0.2.1
  node_modules/externality
    externality@"^0.2.1" from @nuxt/vite-builder@3.0.0-rc.3
    node_modules/@nuxt/vite-builder
      @nuxt/vite-builder@"^3.0.0-rc.3" from nuxt@3.0.0-rc.3
      node_modules/nuxt
        dev nuxt@"3.0.0-rc.3" from the root project
  ufo@"^0.7.11" from @nuxtjs/tailwindcss@5.0.4
  node_modules/@nuxtjs/tailwindcss
    dev @nuxtjs/tailwindcss@"^5.0.4" from the root project

switching to npm 8 and using "overrides": { "ufo": "^0.8.4" } helps for now…

Hi @lyykfi. Please try removing lockfile and node_modules directory. This is likely a vite cache issue.

I hope this is not going to be an issue with every update:) I know this one is closed now @danielroe i guess that is because tailwind is the culprit here with using older ufo, which is fixed in the tailwind module but not yet released in a version.

I ‘like’ to switch back to npm7 because of other issues vue3 vs vue2 with vueuse in npm 8 😦

Hey there 👋

I am having the same issue in my nuxt rc.3 project.

I tried many times to delete package-lock.json and the node_modules folder and reinstall everything, but it didn’t change anything.

Using an npm version >= 8.3 and adding

"overrides": { "ufo": "^0.8.4" }

in my package.json seems to fix the issue 🤔

If this can help, I am also using tailwind 👇

  "devDependencies": {
    "@headlessui/vue": "^1.5.0",
    "@heroicons/vue": "^1.0.6",
    "@nuxtjs/tailwindcss": "^5.0.2",
    "@tailwindcss/forms": "^0.5.0",
    "@tailwindcss/typography": "^0.5.2",
    "nuxt": "^3.0.0-rc.3"
  },
  "overrides": { "ufo": "^0.8.4" }

What was the package depending on an old version of ufo?

(yarn why ufo should show the details.)

cc: @pi0

Had the same issue and got it working by enforcing ufo 0.8.4 across all dependencies in the package.json.

resolutions: {
  "ufo": "^0.8.4"
}

That said, removing node_modules and the lockfile did also work for me and I could remove the resolution again.