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

[Bug] NUXT 3 - plugin is not a function #266

Open
2 tasks done
capoia opened this issue Nov 9, 2022 · 3 comments
Open
2 tasks done

[Bug] NUXT 3 - plugin is not a function #266

capoia opened this issue Nov 9, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@capoia
Copy link

capoia commented Nov 9, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Have you updated Vue FilePond, FilePond, and all plugins?

  • I have updated FilePond and its plugins

Describe the bug

I'm trying to use setoptions to make my own upload method as I did in nuxt2, but it's returning the error "plugin is not a function", as you can see in the reproduction.

Reproduction

https://stackblitz.com/edit/github-8xxhrp?file=app.vue

Environment

- Device: Macbook air m1
- OS: MACOS Ventura
- Broser: Arc
- Vue version: 3.0
- Nuxt version: 3.0
@capoia capoia added the bug Something isn't working label Nov 9, 2022
@okoliken
Copy link

okoliken commented Dec 1, 2022

I have this issue also it's resolved, I used your code snippet on https://stackblitz.com/edit/github-8xxhrp?file=app.vue and it worked for me

@Bsaavedra69
Copy link

I had the same problem and I created a plugin on Nuxt with the following code:

import vueFilePond from "vue-filepond";
import "filepond/dist/filepond.min.css";

import "filepond-plugin-image-preview/dist/filepond-plugin-image-preview.min.css";

import FilePondPluginFileValidateType from "filepond-plugin-file-validate-type";
import FilePondPluginImagePreview from "filepond-plugin-image-preview";

const FilePond = vueFilePond(FilePondPluginFileValidateType, FilePondPluginImagePreview);

export default defineNuxtPlugin(nuxtApp => {
    nuxtApp.vueApp.component('file-pond', FilePond);
});

This code works for me (don't forget to install the plugins filepond-plugin-file-validate-type and filepond-plugin-image-preview).

@AnalyzePlatypus
Copy link

This worked for me (Vue 3.2.247, VueFilepond 7.0.3):

<template>		
  <Filepond />
</template>

<script setup>
  import { ref } from 'vue';
 
  import createVueFilePond from "vue-filepond";
  import "filepond/dist/filepond.min.css";

  const Filepond = createVueFilePond();
</script>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants