nuxt-basic-auth-module
nuxt-basic-auth-module copied to clipboard
Not working with nuxt3
Hi!
I am having an error when trying to get this plugin to work with Nuxt3. Should be working, or is this plugin only intended to run with Nuxt2?
ℹ Register basic auth module to server middleware
ERROR Cannot start nuxt: Cannot read properties of undefined (reading 'handle')
at Function.use (node_modules/connect/index.js:87:21)
at Object.set [as setLegacyMiddleware] (node_modules/@nuxt/nitro/dist/index.mjs:1875:13)
at node_modules/nuxt3/dist/index.mjs:852:17
at async initNuxt (node_modules/nuxt3/dist/index.mjs:945:3)
at async load (node_modules/nuxi/dist/chunks/dev.mjs:6717:9)
at async Object.invoke (node_modules/nuxi/dist/chunks/dev.mjs:6756:5)
at async _main (node_modules/nuxi/dist/chunks/index.mjs:384:7)
This is my nuxt.config.js
export default defineNuxtConfig({
modules: [
[
'nuxt-basic-auth-module'
]
],
alias: {
images: resolve(__dirname, './public/images')
},
vite: {
build: {
chunkSizeWarningLimit: 1000
}
},
basic: {
name: 'AUTH USER NAME HERE',
pass: 'AUTH PASSWORD HERE',
enabled: 'true' // require boolean value(nullable)
},
})
Hey, currently the module only supports Nuxt 2.
Hey, currently the module only supports Nuxt 2.
I see... And is there any plan to support Nuxt3? Obviously no need for deadlines, only intentions.
Currently I don't know anything about plans from the module maintainer regarding Nuxt 3. However, the module is used by many and it would make sense to make it Nuxt 3 compatible. I'll take a look at it & try my best.
any news on nuxt3 support?
There is an module like this with Nuxt 3 Support https://github.com/xtranophilist/nuxt-basic-auth