pqina / svelte-filepond

🔌 A handy FilePond adapter component for Svelte
MIT License
247 stars 10 forks source link

Error: 'registerPlugin' is not exported #1

Open muhsim opened 3 years ago

muhsim commented 3 years ago

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

rikschennink commented 3 years ago

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

jonasnobile commented 3 years ago

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

northkode commented 3 years ago

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

rikschennink commented 3 years ago

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?

daniilr commented 3 years ago

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

"@rollup/plugin-commonjs": "^14.0.0",
Taha-Firoz commented 3 years ago

Same problem on vite

Taha-Firoz commented 3 years ago

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

mharis commented 1 year ago

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