vue-authenticate icon indicating copy to clipboard operation
vue-authenticate copied to clipboard

_vueAuthenticate.VueAuthenticate is not a constructor

Open oseintow opened this issue 5 years ago • 4 comments

Not able to run my test becuase of the following error.

    TypeError: _vueAuthenticate.VueAuthenticate is not a constructor

      Vue.use(VueAxios, axios)

     const vueAuth = new VueAuthenticate(Vue.prototype.$http, {
                                 ^
      baseUrl: 'http://localhost:8000',

      providers: {

      at Object.<anonymous> (resources/js/store/modules/auth.js:10:17)
      at Object.<anonymous> (resources/js/store/modules/__tests__/auth.spec.js:5:1)

What am i doing wrong. It works well in browser but for test it give me the error above

oseintow avatar Feb 02 '19 09:02 oseintow

@oseintow Have you found a fix for this? I'm running into the same issue and I don't know how to fix it.

gurupras avatar Jun 24 '19 15:06 gurupras

I was able to get around this issue by doing this:

const vueAuth =  VueAuthenticate.factory(Vue.prototype.$http, {})

tony-kappen-red-oak avatar Jan 14 '21 15:01 tony-kappen-red-oak

How am I fix this error, VueAuthenticate is not a constructor image , please answel me

shonkhor22 avatar Aug 28 '21 17:08 shonkhor22

How am I fix this error, VueAuthenticate is not a constructor image , please answel me

I'm having the same problem.

erdalonline avatar Sep 11 '21 14:09 erdalonline