Skip to content

Cannot find module './URL' Require stack : [...]whatwg-url #1331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
noook opened this issue Mar 21, 2023 · 3 comments
Closed

Cannot find module './URL' Require stack : [...]whatwg-url #1331

noook opened this issue Mar 21, 2023 · 3 comments

Comments

@noook
Copy link

noook commented Mar 21, 2023

Reproduction

https://github.com/noook/nuxt-vuefire-repro

Steps to reproduce the bug

  1. Fresh install Nuxt npx nuxi@latest init project-name
  2. Install nuxt-vuefire and every dependency
  3. Register plugin in nuxt.config.ts
  4. Run the server
  5. Load the first page

Expected behavior

Should open the page

Actual behavior

a 500 error is thrown:

Node 18:

Cannot find module './URL' Require stack: - /Users/nook/work/vuefire-service/whatwg-url

at Module._resolveFilename (node:internal/modules/cjs/loader:1075:15)
at Module._load (node:internal/modules/cjs/loader:920:27)
at Module.require (node:internal/modules/cjs/loader:1141:19)
at require (node:internal/modules/cjs/helpers:110:18)
at ./whatwg-url:3:15
at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:315:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:159:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:207:14)
at async ./node-fetch:7:31

Node 16:

Cannot find module './URL' Require stack: - /Users/nook/work/vuefire-service/whatwg-url

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
at Function.Module._load (node:internal/modules/cjs/loader:866:27)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
at ./whatwg-url:3:15
at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:315:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:159:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:207:14)
at async ./node-fetch:7:31

Additional information

I tried on both node 16 and 18

Update:
I also tried without firebase installed in the project (I started with the regular Vue getting started, now I only did the Nuxt one) and I am getting a different error:

Cannot find module './websocket/api' Require stack: - /Users/nook/work/vuefire-service/faye-websocket

at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1021:15)
at Function.Module._load (node:internal/modules/cjs/loader:866:27)
at Module.require (node:internal/modules/cjs/loader:1093:19)
at require (node:internal/modules/cjs/helpers:108:18)
at ./faye-websocket:11:14
at ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:315:11)
at runMicrotasks ()
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:159:14)
at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:207:14)
@richardwattie
Copy link

I'm also seeing this issue. The module is completely unusable.

@bogdanciuca
Copy link

Looks like it occurs when ssr: true, which is the default. vuefire-nuxt-example offers some explanation.

@posva
Copy link
Member

posva commented Jul 7, 2023

it's fixed and released now! Turns out vuefire was still relying on some workarounds for Nuxt 3.0.0 and they broke in newer versions

@posva posva closed this as completed Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants