Comments (19)
Hmm I have no idea (and dont have a windows 8 environment to test in). Maybe a good starting point would be to find the source code that generates that .cmd
file?
from electron-prebuilt.
@juliankrispel What happens if you run it inside the shell provided by Git BASH from https://msysgit.github.io/ ?
from electron-prebuilt.
I can confirm that this does not work on either my windows 7 system or my a windows 8 system. Used git bash, did 'npm install -g atom-shell'. The error message I get when I try to run is ' line 1: /node_modules/atom-shell/run.bat: No such file or directory'
from electron-prebuilt.
C'mon guys current released electron.cmd doesn't work even if I run it under Github Shell environment!!!
If I change .cmd contents to:
"%~dp0\node_modules\electron-prebuilt\run.bat" %*
works as it should!
from electron-prebuilt.
If any windows devs want to send a pull request that fixes this we would be happy to merge it. None of the current maintainers have time or expertise to debug windows support beyond CMD.EXE, which it currently works with.
from electron-prebuilt.
Having a look at this, no solution yet. However we need this electron windows fix to be released too before everything will work.
from electron-prebuilt.
@flying-circus npm uses cmd-shim to create the cmd file.
I am looking into how the shebang handling is done for windows.
from electron-prebuilt.
i'm seeing the same issue and i'm happy to help resolve it, but i'm not quite understanding what's happening and would like to before i propose any changes.
Dumb question here: how does the electron.bat
file get into the .bin folder? Is that the cmd-shim's responsibility? Let me explain myself if that's not very clear... i'm seeing two different batch files at play.
One batch file, ~\AppData\npm\Roaming\electron.cmd
, doesn't work for me, and contains:
@IF EXIST "%~dp0\/bin/bash.exe" (
"%~dp0\/bin/bash.exe" "%~dp0\node_modules\electron-prebuilt\run.bat" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
/bin/bash "%~dp0\node_modules\electron-prebuilt\run.bat" %*
)
The ~\AppData\npm\Roaming\node_modules\electron-prebuilt\run.bat
file contains:
"C:\Users\james_000\AppData\Roaming\npm\node_modules\electron-prebuilt\dist\electron.exe" %*
The first batch file doesn't work for me, the second works fine. Is it possible to get that second batch file into the first's location? Is that just something that needs to be added to the install.js script or is there some deeper fix neede?
from electron-prebuilt.
@jugglingnutcase Thanks! I'm very close to sending the pull request. The issue is that the shebang is determined before install.js
runs. And the run.bat file prior to install running has a bash shebang hence the /bin/bash in the cmd file. cmd-shim
doesn't create an if statement with a blank shebang.
I have fixed this with a simple preinstall step.
It's working in a cmd environment but not when using git bash in windows.
from electron-prebuilt.
i had the same fix in progress 😄 i'll wait for your fix to hit then.
from electron-prebuilt.
@jugglingnutcase :)
from electron-prebuilt.
Did you submit it here?
from electron-prebuilt.
I will associate the pull request fixing this. Not submitted yet due to the git bash issue.
from electron-prebuilt.
@JamesKyburz i just tested your fix and it works fine for me in GitHub for Windows git bash:
james_000@NEO ~/Documents/src/test-electron-prebuilt/node_modules/.bin
$ cmd "/c electron.cmd"
c:\Users\james_000\Documents\src\test-electron-prebuilt\node_modules\.bin>"c:\Users\james_000\Documents\src\test-electron-prebuilt\node_modules\.bin\\..\electron-prebuilt\run.bat"
c:\Users\james_000\Documents\src\test-electron-prebuilt\node_modules\.bin>"c:\Users\james_000\Documents\src\test-electron-prebuilt\node_modules\electron-prebuilt\dist\electron.exe"
[12384:0421/132342:INFO:renderer_main.cc(212)] Renderer process started
from electron-prebuilt.
@jugglingnutcase Nice! FYI I'm force pushing like a made man at the mo ;)
Basically git bash needs the shebang and cmd doesn't. Still playing around to be sure.
from electron-prebuilt.
@jugglingnutcase I sent the pull request now.
Not happy with having to check the process.title for git bash but should work. cygwin will never work anyways ;)
I have verified that it works in cmd.exe but as I am suffering from this issue preventing me to checking the git bash env.
Could you please check it works in your git bash environment?
from electron-prebuilt.
@jugglingnutcase never mind the process.title is npm when npm is installing.......Will look at this again tomorrow.
from electron-prebuilt.
OK done now. All the sane things failed in windows like echo $SHELL or checking for the presence of /bin/bash.
I came up with process.env.TERM this is falsy in cmd.exe and set to something otherwise.
I have verified both cmd.exe and git bash on my virtual machine running win 8.1.
from electron-prebuilt.
Please see pull request for details. I replaced run.bat with cli.js and removed the preinstall step.
from electron-prebuilt.
Related Issues (20)
- OpenBSD as a supportet platform? HOT 2
- Unable to install Electron with the quick-start tutorial HOT 7
- "sudo npm install -g electron" fails HOT 1
- Electron not installing (Windows 10) HOT 2
- Got stuck after npm install -g HOT 1
- Error while installing npm in windows 10 HOT 1
- Mac: Failed at the [email protected] postinstall script 'node install.js'. HOT 4
- npm install hangs HOT 3
- Dependency to @types/node makes electron package incompatible with typescript projects not using commonjs HOT 11
- Can't install electron 1.7.1 locally using npm 5 HOT 10
- Install on Bash on Ubuntu on Windows (WSL) HOT 13
- Postinstall script failing HOT 22
- Error: Generated checksum for "electron-v1.4.13-linux-x64.zip" did not match expected checksum. HOT 11
- Prebuilt electron package for Ubuntu 10.04 32 bits HOT 1
- node (vs. nodejs) is required when installing electron HOT 5
- Can't install in Windows10 HOT 1
- Change electron binary path via environment variable? HOT 2
- Electron not installing on Mac Os High Sierra HOT 1
- npm ERR! [email protected] postinstall
- Error while installing electron on Mac
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from electron-prebuilt.