AloisSeckar / AloisSeckar/nuxt-ignis
For some reason `nuxt-security` requires to specify `h3` v1 dependency
- Dominant language
- TypeScript
- Stars
- 18
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Installing nuxt-ignis for https://github.com/AloisSeckar/Alois-Seckar.cz I ran into resolution error on Netlify.
I was getting runtime errors when trying to load the homepage:
> Jun 6, 08:40:25 AM: 3ac502d7 ERROR [request error] [unhandled] [GET] [https://alois-seckar.cz/__nuxt_error?error=true&url=%2F&statusCode=500&statusMessage=Server+Error&message=Server+Error](vscode-file://vscode-app/c:/Apps/VSCode/6a44c352bd/resources/app/out/vs/code/electron-browser/workbench/workbench.html)
> TypeError: event.req.headers.get is not a function
at isPreflightRequest (file:///var/task/chunks/nitro/nitro.mjs:6794:35)
... 8 lines matching cause stack trace ...
at async toNodeHandle (file:///var/task/chunks/nitro/nitro.mjs:2732:9) {
cause: TypeError: event.req.headers.get is not a function
at isPreflightRequest (file:///var/task/chunks/nitro/nitro.mjs:6794:35)
at handleCors (file:///var/task/chunks/nitro/nitro.mjs:6824:6)
at Object.handler (file:///var/task/chunks/nitro/nitro.mjs:8656:5)
at Object.handler (file:///var/task/chunks/nitro/nitro.mjs:2446:31)
at async toNodeHandle (file:///var/task/chunks/nitro/nitro.mjs:2724:7)
at async b (file:///var/task/chunks/nitro/nitro.mjs:1203:7027)
at async C (file:///var/task/chunks/nitro/nitro.mjs:1203:7310)
at async errorhandler (file:///var/task/chunks/nitro/nitro.mjs:6137:40)
at async errorHandler (file:///var/task/chunks/nitro/nitro.mjs:6235:7)
at async toNodeHandle (file:///var/task/chunks/nitro/nitro.mjs:2732:9),
statusCode: 500,
fatal: false,
unhandled: true,
statusMessage: undefined,
data: undefined
}
It is not a general problem though, because other projects work fine.
After some digging, AI correctly spotted clashes between `h3` v1 and v2 versions.
Solution was to add
```
packageExtensions:
nuxt-security:
dependencies:
h3: ^1.15.11
```
into pnpm-workspace.yaml to pin the h3 resloution to v1
Nuxt Ignis should take care of this,
Maybe it will also sort out itself eventually when `nuxt-security` got updated from current `2.6.0`
Contributor guide
Assessment
This issue has not been assessed yet.