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

Error on constructor #686

Closed
LorhanSohaky opened this issue Apr 10, 2020 · 6 comments · Fixed by #709
Closed

Error on constructor #686

LorhanSohaky opened this issue Apr 10, 2020 · 6 comments · Fixed by #709

Comments

@LorhanSohaky
Copy link

Description
I have an application in Vue and when trying to run the contructor, it gives the following error.

image

_gitbeaker_browser__WEBPACK_IMPORTED_MODULE_6__.Gitlab is not a constructor
    at new GitLab (gitlab.js:7)
    at _callee5$ (AfterLogin.vue:369)
    at tryCatch (runtime.js:45)
    at Generator.invoke [as _invoke] (runtime.js:274)
    at Generator.prototype.<computed> [as next] (runtime.js:97)
    at asyncGeneratorStep (asyncToGenerator.js:3)
    at _next (asyncToGenerator.js:25)
    at asyncToGenerator.js:32
    at new Promise (<anonymous>)
    at asyncToGenerator.js:21
    at VueComponent.getUser (AfterLogin.vue:361)
    at VueComponent.getInfo (AfterLogin.vue:304)
    at VueComponent.mounted (AfterLogin.vue:193)
    at invokeWithErrorHandling (vue.runtime.esm.js:1854)
    at callHook (vue.runtime.esm.js:4219)
    at Object.insert (vue.runtime.esm.js:3139)
    at invokeInsertHook (vue.runtime.esm.js:6346)
    at Vue.patch [as __patch__] (vue.runtime.esm.js:6565)
    at Vue._update (vue.runtime.esm.js:3945)
    at Vue.updateComponent (vue.runtime.esm.js:4066)
    at Watcher.get (vue.runtime.esm.js:4479)
    at new Watcher (vue.runtime.esm.js:4468)
    at mountComponent (vue.runtime.esm.js:4073)
    at Vue.push../node_modules/vue/dist/vue.runtime.esm.js.Vue.$mount (vue.runtime.esm.js:8415)
    at Module../src/main.js (main.js:53)
    at __webpack_require__ (bootstrap:784)
    at fn (bootstrap:150)
    at Object.1 (Settings.vue?66a4:1)
    at __webpack_require__ (bootstrap:784)
    at checkDeferredModules (bootstrap:45)
    at bootstrap:860
    at bootstrap:860

Steps to reproduce

Dependencies

node: v10

  "vue": "^2.6.11",
  "@gitbeaker/browser": "^17.0.1",

Code

import { Gitlab } from "@gitbeaker/browser";

const token = "<token>";
try {
  const api = new Gitlab({
    token
  });
} catch(err) {
  console.error(err);
}
@jdalrymple jdalrymple added the Bug label Apr 11, 2020
@jdalrymple
Copy link
Owner

Could you provide a sample repo with this?

@LorhanSohaky
Copy link
Author

https://codesandbox.io/s/crimson-sea-cf5uk?file=/src/gitlab.js

@jdalrymple
Copy link
Owner

Should be good with this latest release. Give it a look in a few minutes!

@jetersen
Copy link
Contributor

Yes: https://codesandbox.io/s/wizardly-germain-whvr6?file=/src/gitlab.js switching to v19.0 makes it work

@LorhanSohaky
Copy link
Author

Thanks!!!

@jdalrymple
Copy link
Owner

🚀 Issue was released in 22.0.0 🚀

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

Successfully merging a pull request may close this issue.

3 participants