orbit icon indicating copy to clipboard operation
orbit copied to clipboard

Electron fails to start on Windows.

Open mateon1 opened this issue 7 years ago • 5 comments

Even if the build issue due to go-ipfs-dep on Windows is fixed, a new issue appears. When running npm start:

> [email protected] start C:\Users\matin\orbit
> npm run electron


> [email protected] electron C:\Users\matin\orbit
> electron .

fs.js:634
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\matin\orbit\node_modules\electron-prebuilt\path.txt'
    at Error (native)
    at Object.fs.openSync (fs.js:634:18)
    at Object.fs.readFileSync (fs.js:502:33)
    at Object.<anonymous> (C:\Users\matin\orbit\node_modules\electron-prebuilt\index.js:4:42)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)
    at Function.Module._load (module.js:409:3)
    at Module.require (module.js:468:17)

npm ERR! Windows_NT 10.0.14936
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "electron"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] electron: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] electron script 'electron .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the orbit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     electron .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs orbit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls orbit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\matin\orbit\npm-debug.log

npm ERR! Windows_NT 10.0.14936
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.2.2
npm ERR! npm  v3.9.5
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `npm run electron`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'npm run electron'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the orbit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     npm run electron
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs orbit
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls orbit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\matin\orbit\npm-debug.log

There is nothing interesting in npm-debug.log.

mateon1 avatar Oct 08 '16 23:10 mateon1

@mateon1 thank you very much for reporting the issue! I'll work to pull in the latest version of Electron that you referenced. Can you confirm that that 1.4.3 fixes the issue for you?

We haven't done any work on Windows yet, so anything may come across is uncharted territory. Would you be interested in trying to fix those issues? Regardless, much appreciate the bug report.

haadcode avatar Oct 09 '16 12:10 haadcode

@haadcode Yes, I tested the install updating Electron to 1.4.3, and everything seemed to install correctly (after npm link-ing packages depending on go-ipfs-dep with the Windows fix).

Now, my Windows machine is a Frankenstein's monster with GNU tools available on the path (like rm, which some post-install scripts seem to use), and properly interpreting .sh scripts (which are also used as post install scripts), so it working on my machine doesn't imply it working on any Windows machine.

There is still a lot of work to do for Windows, but this gets us significantly closer.

mateon1 avatar Oct 09 '16 13:10 mateon1

Yes, I tested the install updating Electron to 1.4.3, and everything seemed to install correctly

Great to hear! I'll make sure to pull the new version in as soon as I get the time to do it.

Re. those shell scripts, ideally we shouldn't use any shell scripts in the development environment (due to the reason you laid out above). The scripts were created to quickly get all the different custom versions of ipfsd-ctl, js-ipfs-api, go-ipfs-dep etc. to work together due to version conflicts with pretty much in all of them (eg. ipfs-api got pulled in 5(!) times, each from different package, each different version 😢). I expect that we can completely remove the scripts as soon as the work on go-ipfs-dep and js-ipfs-api is done to support a) custom version of go-ipfs binary and b) pubsub support in *-ipfs-api. @mateon1 what do you think, does that make sense?

cc @diasdavid @dignifiedquire see above the comment about upcoming work on the ipfs packages. I can make sure go-ipfs-dep works, but would need some help on publishing custom versions (like, I want to be able to require [email protected])

haadcode avatar Oct 09 '16 14:10 haadcode

@mateon1 pushed Electron 1.4.3 dep to master.

haadcode avatar Oct 10 '16 15:10 haadcode

Adding this issue to a milestone for the next quarter. The goal is to make Orbit work on Windows too.

haadcode avatar Oct 19 '16 08:10 haadcode