pqina/svelte-filepond

Error: 'registerPlugin' is not exported

muhsim opened this issue · 8 comments

I am seeing the following error while trying to use it (npm run dev):

[!] Error: 'registerPlugin' is not exported by node_modules/filepond/dist/filepond.js, imported by node_modules/svelte-filepond/src/index.js

Versions

  • "filepond": "^4.21.0"
  • "svelte-filepond": "0.0.1"

Can you create a test case on https://codesandbox.io/

I've had the same problem. My solution was to change rollup-plugin-node-resolve to '@rollup/plugin-node-resolve.

I am already using "@rollup/plugin-node-resolve": "^7.1.1",
and the error remains.

Error: 'registerPlugin' is not exported by node_modules/filepond/dist/filepond.js, imported by node_modules/svelte-filepond/src/index.js

does the svelte file pond have a different dependency version ?
This is easy to reproduce, follow the docs with a svelte project and it breaks instantly for me

It's weird, it's trying to import from the iife version of FilePond instead of the es module which is in the same folder. Anyone know how to instruct bundlers to use the esm version?

I've faced the same issue. It was solved by upgrading of @rollup/plugin-commonjs:

"@rollup/plugin-commonjs": "^14.0.0",

Same problem on vite

fixed the issue by removing the export from the index file and importing registerPlugin from filepond directly

@Taha-Firoz Can you share an example of how you solved the issue with vite?