nuxt-modules / prismic

Easily connect your Nuxt.js application to your content hosted on Prismic
https://prismic.nuxtjs.org
MIT License
245 stars 48 forks source link

Failed to load Parser5 file #217

Closed timothejoubert closed 2 months ago

timothejoubert commented 2 months ago

Bug description

image

Parser5 don't generate index.js.map file

Environment


Reproduction

Can be reproduce on your online playground

Logs

[19:51:08]  WARN  Failed to load source map for /home/projects/kkvillvwkz.github/node_modules/parse5/dist/index.js.
Error: An error occurred while trying to read the map file at index.js.map
ENOENT: no such file or directory, open '/home/projects/kkvillvwkz.github/node_modules/parse5/dist/index.js.map'

[19:51:09]  WARN  Failed to load source map for /home/projects/kkvillvwkz.github/node_modules/parse5/dist/parser/index.js.
Error: An error occurred while trying to read the map file at index.js.map
ENOENT: no such file or directory, open '/home/projects/kkvillvwkz.github/node_modules/parse5/dist/parser/index.js.map'

[19:51:09]  WARN  Failed to load source map for /home/projects/kkvillvwkz.github/node_modules/parse5/dist/tree-adapters/default.js.
Error: An error occurred while trying to read the map file at default.js.map
ENOENT: no such file or directory, open '/home/projects/kkvillvwkz.github/node_modules/parse5/dist/tree-adapters/default.js.map'

[19:51:09]  WARN  Failed to load source map for /home/projects/kkvillvwkz.github/node_modules/parse5/dist/serializer/index.js.
Error: An error occurred while trying to read the map file at index.js.map
ENOENT: no such file or directory, open '/home/projects/kkvillvwkz.github/node_modules/parse5/dist/serializer/index.js.map'

Additional context

Revert Prismic version don't fix this bug. This issue break my HMR in my app. Does anyone have a temporary solution for this?

lihbr commented 2 months ago

Hey @timothejoubert, thanks for contributing!

We're aware of this issue with parse5, it's also impacting @nuxt/content and @nuxtjs/mdc. The issue has already been reported to parse5, we're hoping they will be able to release a fix soon.

On our end we'll release a fix tomorrow/Thursday to remove our dependency on parse5, which should silence the warning on your end and make HMR work again.

Edit: In the meantime, you can pin @prismicio/client to version ~7.6.0 to fix this issue: npm install @prismicio/client@~7.6.0 (it's a dependency of @nuxtjs/prismic so you might not have it already, but this should solve the issue temporarily)

Thanks for your understanding!

lihbr commented 2 months ago

Hi there, this issue should be fixed with the latest version of @prismicio/client.

You should be able to get it using npm update @prismicio/client, or by removing your lock file and node modules folder and reinstalling your project again.

Thanks for your patience! 🙏 Feel free to reopen if you still experience the same trouble.