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

Uncaught TypeError: Object(...) is not a function #12

Closed
sebolio opened this issue Apr 6, 2021 · 4 comments
Closed

Uncaught TypeError: Object(...) is not a function #12

sebolio opened this issue Apr 6, 2021 · 4 comments

Comments

@sebolio
Copy link

sebolio commented Apr 6, 2021

Hi, I'm trying to use this and followed instructions, tried adding into main.js or the Vue file, but same problem.

My HTML:

      <vue-collapsible-panel-group>
        <vue-collapsible-panel>
          <template #title>
            Panel A Title
          </template>
          <template #content>
            Panel A Content
          </template>
        </vue-collapsible-panel>
        <vue-collapsible-panel>
          <template #title>
            Panel B Title
          </template>
          <template #content>
            Panel B Content
          </template>
        </vue-collapsible-panel>
      </vue-collapsible-panel-group>

I keep getting

vue-collapsible-panel.common.js?9adf:3531 Uncaught TypeError: Object(...) is not a function
    at Module.fb15 (vue-collapsible-panel.common.js?9adf:3531)
    at __webpack_require__ (vue-collapsible-panel.common.js?9adf:21)
    at eval (vue-collapsible-panel.common.js?9adf:85)
    at eval (vue-collapsible-panel.common.js?9adf:88)
    at Object../node_modules/@dafcoe/vue-collapsible-panel/dist/vue-collapsible-panel.common.js (vendors~app.js:56)
    at __webpack_require__ (app.js:854)
    at fn (app.js:151)
    at eval (main.js:66)
    at Module../src/main.js (app.js:1843)
    at __webpack_require__ (app.js:854)

The referenced line has this:
image

@dafcoe
Copy link
Owner

dafcoe commented Apr 8, 2021

Hi @tr4g,

Apparently you're using it the right way. Can you show more code, or at least where you import the component?

@dafcoe dafcoe closed this as completed Apr 20, 2021
@gbkwiatt
Copy link

gbkwiatt commented May 9, 2021

Same here, I've imported it locally in component. but it also doesn't work when registered globally.

@dafcoe
Copy link
Owner

dafcoe commented May 9, 2021

Hi @gbkwiatt,

Can you share the code where you're registering it?

@vvnsrzn
Copy link

vvnsrzn commented May 13, 2021

I have the same problem with Nuxt.

plugins/accordion.client.js

import Vue from 'vue'
import VueCollapsiblePanel from '@dafcoe/vue-collapsible-panel'
Vue.use(VueCollapsiblePanel)

nuxt.config.js
...
plugins: [''~/plugins/accordion.client.js'],
...

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

4 participants