Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

electron-rebuild fault #919

Closed
xCrazylei opened this issue Dec 28, 2018 · 9 comments
Closed

electron-rebuild fault #919

xCrazylei opened this issue Dec 28, 2018 · 9 comments

Comments

@xCrazylei
Copy link

xCrazylei commented Dec 28, 2018

electron v1.7.11
electron-rebuild v1.8.2
nodejs v8.9.3

When I need to rebuild the program, ipfs-http-client reported an error, which may be related to ursa-optional library. Please help me check, thank you
image

@xCrazylei xCrazylei changed the title electron-rebuild fault, electron-rebuild fault Dec 28, 2018
@daviddias
Copy link
Contributor

@ipfs/wg-gui-team any advice for electron users?

PS: It would be great to have an update for users at ipfs/notes#256

@alanshaw
Copy link
Contributor

Hmmm, this is odd, ursa-optional should not cause an error on rebuild.

@olizilla
Copy link
Contributor

@yueleiMaster can you give us any more info? I've not seen that error before.

@lidel
Copy link
Contributor

lidel commented Jan 25, 2019

@yueleiMaster I see you are building on Windows. "file not found" is probably due to path separator hardcoded somewhere: c:\foo\bar used on windows and /foo/bar being the unix way.

@hacdias suggested solution in ipfs/ipfs-desktop#690:

npm install --global windows-build-tools

To build on windows, you need windows-build-tools. I can assure you it will work since it's the platform I use 😄

Let us know if this helps.

@kav
Copy link

kav commented May 7, 2019

I'm seeing a very similar error, trouble finding headers uRSA needs, on OSX when attempting to import js-ipfs-http-client into an electron-forge based project which appears to be related to:

JoshKaufman/ursa#161
electron/electron#11801

It would also appear, in comments on those issues, that uRSA can be replaced with native javascript methods in node versions v10.12 and later. Switching to the native methods will land here I believe:

libp2p/js-libp2p-crypto#130

In the meantime; any other solid workarounds? I can monkey patch electron I suppose but I'd love something simpler.

node: 10.15.3 and 12.1.0
electron-forge: 5.2.4 and 6.0.0-beta.34
electron: 5.0.1

An unhandled error has occurred inside Forge:
  CXX(target) Release/obj.target/ursaNative/src/ursaNative.o
In file included from ../src/ursaNative.cc:3:
../src/ursaNative.h:13:10: fatal error: 'openssl/rsa.h' file not found
#include <openssl/rsa.h>
         ^~~~~~~~~~~~~~~

@lidel
Copy link
Contributor

lidel commented May 8, 2019

cc @hugomrdias (sounds related to our plans to improve dev experience in Electron)

@hugomrdias
Copy link
Contributor

hugomrdias commented May 8, 2019

Yes I already ran into this, there is two topics related to this

  • we don't support electron 5 or node 12 yet
  • electron-rebuild doesn't work (I'm track this)

To use electron 4 and workaround electron-rebuild please check https://github.com/ipfs/js-ipfs/tree/master/examples/run-in-electron specifically the rebuild.sh.

@daviddias
Copy link
Contributor

@hugomrdias, it is worth sharing an update here ipfs/notes#256

@hugomrdias
Copy link
Contributor

This issue is fixed with the latest version and notes are updated ipfs/notes#256 (comment)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

7 participants