DEV Community

Discussion on: Uploading Files to IPFS from a Web Application

Collapse
 
lschulzes profile image
Lucas Schulze

Hi there, great article, I am doing the same thing, but this error pops up, do you have any idea why?
I am using react and not electron, that's weird for me.

node_modules/electron-fetch/lib/index.es.js:1257:21: error: Could not resolve "electron" (mark it as external to exclude it from the bundle, or surround it with try/catch to handle the failure at run-time)

Collapse
 
ajsihota profile image
AJ Sihota

Im getting the same error using vite. Any luck solving this?

Collapse
 
lschulzes profile image
Collapse
 
lschulzes profile image
Lucas Schulze

Hey, I ended up switching to Web3Storage, I also used vite.

Collapse
 
kevinleeming profile image
Ming-Jung Lee

My error is Uncaught SyntaxError: The requested module '/node_modules/merge-options/index.js?v=7ace0d54' does not provide an export named 'default'

Can anyone help me ,, I use vite and react , seems import { create } from 'ipfs-http-client'; doesn't work fine in this case ??

Collapse
 
starboy2103 profile image
starboy2103

Just delete 'electron-fetch' from 'node_modules'. I think it should work.