In the process of attempting to create a template of electron-react-boilerplate with ipfs-core (currently a work in progress), I run into a curious problem.
If you clone the above repo, make sure that ipfs-core is NOT listed as a dependency (nor a devDependency) in package.json, then run:
npm install npm install ipfs-core npm start
However, if I manually place ipfs-core into package.json as a dependency prior to the initial installation step, then when I try to install, I get the error:
Webpack does not work with native dependencies. ipfs-core is a native dependency and should be installed inside of the "./release/app" folder. First, uninstall the packages from "./package.json": npm uninstall your-package Then, instead of installing the package to the root "./package.json": npm install your-package Install the package to "./release/app/package.json" cd ./release/app && npm install your-package Read more about native dependencies at: https://electron-react-boilerplate.js.org/docs/adding-dependencies/#module-structure
I’ve tried doing the things your’re supposed to do in electron-react-boilerplate for native dependencies:
cd release/app npm install ipfs-core npm run postinstall cd ../.. npm start
but I haven’t gotten that to work in the app.
I’m a novice when it comes to electron and native dependencies, so it’s very possible I’m misunderstanding something.
Thank you in advance for any insights you may have!