svelte-filepond icon indicating copy to clipboard operation
svelte-filepond copied to clipboard

Error: 'registerPlugin' is not exported

Open muhsim opened this issue 3 years ago • 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"

muhsim avatar Oct 07 '20 01:10 muhsim

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

rikschennink avatar Oct 09 '20 06:10 rikschennink

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

jonasnobile avatar Dec 04 '20 13:12 jonasnobile

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

northkode avatar Dec 15 '20 04:12 northkode

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?

rikschennink avatar Dec 15 '20 07:12 rikschennink

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

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

daniilr avatar Dec 23 '20 19:12 daniilr

Same problem on vite

Taha-Firoz avatar Mar 07 '21 11:03 Taha-Firoz

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

Taha-Firoz avatar Mar 07 '21 11:03 Taha-Firoz