nuxt-modules / html-validator

HTML validation for Nuxt
https://html-validator.nuxtjs.org
MIT License
197 stars 22 forks source link

How to fix: [worker reload] [worker init] Cannot find package 'html-validate' #519

Closed FlorianWerndl closed 2 months ago

FlorianWerndl commented 2 months ago

Since some time I cannot start my dev server with html-valudate module enabled. The module seems to be loaded from the wrong path in my .nuxt/dev/server.index.mjs file.

Bildschirmfoto 2024-07-30 um 11 45 33 Bildschirmfoto 2024-07-30 um 11 47 29

Instead of ... from 'html-validate' there should be an absolute path to the folder on the file system. I don't think there is an error within the module as I cannot reproduce the error on a new newly created project or on stackblitz.

I have already deleted npm cache, node_modules and package-lock.json and did a clean install. This also happens to people using the same repo so I guess it is related to some config. Any idea how this could happen and how to solve? I don't run into the same problems using other modules.

Infos:

------------------------------
- Operating System: Darwin
- Node Version:     v20.11.0
- Nuxt Version:     3.12.4
- CLI Version:      3.12.0
- Nitro Version:    2.9.7
- Package Manager:  npm@10.8.2
- Builder:          -
- User Config:      future, experimental, runtimeConfig, app, components, imports, devtools, typescript, modules, eslint, fontMetrics, i18n, tailwindcss, postcss, css, alias, vite, build, sourcemap, hooks, compatibilityDate
- Runtime Modules:  @nuxtjs/html-validator@1.8.2, @nuxtjs/critters@0.7.1, @nuxtjs/fontaine@0.4.3, @nuxtjs/i18n@8.3.3, @nuxtjs/tailwindcss@6.12.1, @pinia/nuxt@0.5.2, @vueuse/nuxt@10.11.0, nuxt-lazy-hydrate@1.0.0, nuxt-viewport@2.1.5, @nuxt/eslint@0.4.0
- Build Modules:    -
------------------------------
FlorianWerndl commented 2 months ago

Fixed by installing it manually with npm i html-validate thx @danielroe