Skip to content
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

The requested module ...hast-util-whitespace... does not provide an export named 'whitespace' #216

Closed
MarioC3 opened this issue Jul 24, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MarioC3
Copy link

MarioC3 commented Jul 24, 2024

Versions

  • nuxt: ^3.12.4
  • @nuxtjs/prismic: ^3.3.2
  • node: 20.5.1

Reproduction

https://stackblitz.com/edit/nuxt-starter-rxtw93
https://stackblitz.com/github/nuxt-modules/prismic/tree/master/examples/minimal?file=pages%2Findex.vue -> Your starter is broken as well.

Steps to reproduce

When starting the Nuxt's environment via yarn dev, the server shows a bunch of warnings, and ultimately errors out:

[nuxt] [request error] [unhandled] [500] The requested module './../_node_modules/hast-util-whitespace/lib/index.js' does not provide an export named 'whitespace'
  at ModuleJob._instantiate (node:internal/modules/esm/module_job:122:21)  
  at async ModuleJob.run (node:internal/modules/esm/module_job:188:5)  
  at async DefaultModuleLoader.import (node:internal/modules/esm/loader:228:24)  
  at async ViteNodeRunner.interopedImport (./node_modules/vite-node/dist/client.mjs:421:28)  
  at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:280:24)  
  at async ViteNodeRunner.cachedRequest (./node_modules/vite-node/dist/client.mjs:206:14)  
  at async ViteNodeRunner.dependencyRequest (./node_modules/vite-node/dist/client.mjs:259:12)  
  at async ./node_modules/@nuxtjs/prismic/dist/runtime/plugin.js:8:31  
  at async ViteNodeRunner.runModule (./node_modules/vite-node/dist/client.mjs:399:5)  
  at async ViteNodeRunner.directRequest (./node_modules/vite-node/dist/client.mjs:381:5)

What is Expected?

That Nuxt starts normally.

What is actually happening?

Nuxt is erroring out. 😭

@MarioC3 MarioC3 added the bug Something isn't working label Jul 24, 2024
@MarioC3
Copy link
Author

MarioC3 commented Jul 24, 2024

Digging a little bit more, I think the bug was introduced on @prismicio/client 7.7.0. When adding some of the hast dependencies.

If I add "@prismicio/client": "7.6.0" to my resolutions, nuxt starts normally.

@lihbr
Copy link
Collaborator

lihbr commented Jul 24, 2024

Hi @MarioC3, thanks! I'll have a prompt look into it.

Indeed, for now pinning the dependency work as a temporary fix. I'll let you know when we fix it for good (hopefully today)

@lihbr
Copy link
Collaborator

lihbr commented Jul 24, 2024

Hi there,

Once again, thank you so much for reporting this issue and trying out the latest version of our kit!

This should now be fixed in @prismicio/client v7.7.4, update with:

npm update @prismicio/client

P.S. I'm aware of the warning spam going on about some source map not loading. This appears to be caused by: inikulin/parse5#1194 (also related: nuxt/content#2663), I'll see what I can do about it.

I'm gonna close this issue as everything checked in our QA process. If you still experience the issue with the latest version, you're very welcome to reopen this issue!

Thanks again 🙏

@lihbr lihbr closed this as completed Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants