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

Not working with nuxt3 #234

Open
cmmata opened this issue Jan 3, 2022 · 5 comments
Open

Not working with nuxt3 #234

cmmata opened this issue Jan 3, 2022 · 5 comments

Comments

@cmmata
Copy link

cmmata commented Jan 3, 2022

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)
  },
})
@Intevel
Copy link

Intevel commented Apr 3, 2022

Hey, currently the module only supports Nuxt 2.

@cmmata
Copy link
Author

cmmata commented Apr 4, 2022

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.

@Intevel
Copy link

Intevel commented Apr 4, 2022

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.

@degoya
Copy link

degoya commented Nov 24, 2022

any news on nuxt3 support?

@Intevel
Copy link

Intevel commented Nov 25, 2022

There is an module like this with Nuxt 3 Support https://github.com/xtranophilist/nuxt-basic-auth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants