Skip to content

registerPlugin returning "plugin is not a function" for file validation plugin #70

@dcp3450

Description

@dcp3450

Is there an existing issue for this?

  • I have searched the existing issues

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

  • I have updated FilePond and its plugins

Describe the bug

When running application I get the error:

filepond.js:12458 Uncaught TypeError: plugin is not a function
    at createAppPlugin (filepond.js:12458:29)
...
    at registerPlugin (filepond.js:12695:21)
...

Running:
filepond: 4.30.4
filepond-plugin-file-validate-type: 1.2.8
ngx-filepond: 6.0.1

Angular: 13
Node: 16

Importing via module:

import * as FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';
import { FilePondModule, registerPlugin } from 'ngx-filepond';
registerPlugin(FilePondPluginFileValidateType);

I logged out registerPlugin and FilePondPluginFileValidateType and get the the following:

registerPlugin:  ƒ registerPlugin() {
      for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) {
        plugins[_key] = arguments[_key];
      } // register plugins


      plu…
FilePondPluginFileValidateType:  Module {__esModule: true, Symbol(Symbol.toStringTag): 'Module'}

Issue started after an upgrade to Angular 13 and upgrading filepond packages to their latest versions.

Reproduction

Import filepond packages and register the plugin for File Validation.

Environment

- Device: Computer
- OS: Windows 10
- Browser: Chrome
- Angular version: 13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions