Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

error: Could not resolve "electron" when using in a web app #4011

Closed
@rhysburnie

Description

@rhysburnie

Hi I get the following in a vite/vue app when i import ipfs

Pre-bundling dependencies:
 vue
 anchorme
 ipfs-core
(this will be run only when your dependencies or config have changed)
> 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)
   1257 │   electron = require('electron');

It only happens when I import ipfs but I am confused why electron would be involved at all in this situation.

I have seen people use ipfs fine in react (web) apps

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps upeffort/daysEstimated to take multiple days, but less than a weekexp/expertHaving worked on the specific codebase is importantkind/resolved-in-helianeed/analysisNeeds further analysis before proceeding

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions