New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts return immediately without output in Windows #2200

Closed
strugee opened this Issue May 13, 2014 · 21 comments

Comments

Projects
None yet
9 participants
@strugee
Contributor

strugee commented May 13, 2014

I'm trying to build Atom in Windows 7. Essentially, the problem is that tools in the scripts/ directory (even the ones with .cmd on the end of the filename) return almost immediately, with no output, and with no visible action having occurred when executed. A log says more than I ever could, so here's a log of my full PowerShell session. This was done from the "Git Shell" shortcut.

Windows PowerShell
Copyright (C) 2009 Microsoft Corporation. All rights reserved.

C:\Users\SAAS Student\Development> node --version
v0.10.28
C:\Users\SAAS Student\Development> npm --version
1.4.9
C:\Users\SAAS Student\Development> python --version
Python 2.7.5
C:\Users\SAAS Student\Development> $env:Path = $env:Path + ";C:\Users\SAAS Stude
nt\Development\atom\node_modules"
C:\Users\SAAS Student\Development> $env:Path
C:\Users\SAAS Student\AppData\Local\GitHub\PortableGit_054f2e797ebafd44a3020308
8cd3d58663c627ef\cmd;C:\Users\SAAS Student\AppData\Local\GitHub\PortableGit_054
f2e797ebafd44a30203088cd3d58663c627ef\bin;C:\Users\SAAS Student\AppData\Local\A
pps\2.0\PJJW51GN.J7H\XE5ECTLG.WDC\gith..tion_317444273a93ac29_0001.0003_e68db37
a99107794;C:\Windows\Microsoft.NET\Framework\v4.0.30319;C:\Python27\;C:\Program
 Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Perl64\site\bin;C:\Perl64\bin;C
:\Python33\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\
System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Services\IPT\;C:\
Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\O
penCL SDK\2.0\bin\x64;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Pr
ogram Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\WiFi\bin\
;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Git
\cmd;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files (x86
)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\GNU\GnuPG\pu
b;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\nodejs\;C:\Progra
m Files\OpenNI\Bin64;C:\Program Files\PCL 1.6.0\bin;C:\Program Files (x86)\node
js\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\Wirele
ssCommon\;C:\Users\SAAS Student\fciv;C:\Program Files (x86)\Android\android-sdk
\platform-tools;C:\Users\AppData\Roaming\npm;C:\Program Files\nodejs\;C:\Users\
SAAS Student\Development\opencv\build\x64\vc10\bin;C:\Users\SAAS Student\AppDat
a\Roaming\npm;C:\Users\SAAS Student\Development\atom\node_modules
C:\Users\SAAS Student\Development> cd .\atom
C:\Users\SAAS Student\Development\atom [master]> git pull
Already up-to-date.
C:\Users\SAAS Student\Development\atom [master]> .\script\build
C:\Users\SAAS Student\Development\atom [master]>

Running npm install results in normal NPM output, with no error, but I won't bore you with the full log. The results are the same.

@ArabCoders

This comment has been minimized.

Show comment
Hide comment
@ArabCoders

ArabCoders May 13, 2014

I have the same problem as well using git shell as both cywin/powershell

C:\github\atom [master]> node --version
v0.10.28
C:\github\atom [master]> npm --version
1.4.9
C:\github\atom [master]> python --version
Python 2.7.6
C:\github\atom [master]> .\script\build
C:\github\atom [master]>

ArabCoders commented May 13, 2014

I have the same problem as well using git shell as both cywin/powershell

C:\github\atom [master]> node --version
v0.10.28
C:\github\atom [master]> npm --version
1.4.9
C:\github\atom [master]> python --version
Python 2.7.6
C:\github\atom [master]> .\script\build
C:\github\atom [master]>
@Gullanshire

This comment has been minimized.

Show comment
Hide comment
@Gullanshire

Gullanshire May 26, 2014

I also have this problem using git shell under win8.

D:\Programmes and Files\atom [master]> node --version
v0.10.28
D:\Programmes and Files\atom [master]> npm --version
1.4.9
D:\Programmes and Files\atom [master]> python --version
Python 2.7.6
D:\Programmes and Files\atom [master]> .\script\build
D:\Programmes and Files\atom [master]>

Gullanshire commented May 26, 2014

I also have this problem using git shell under win8.

D:\Programmes and Files\atom [master]> node --version
v0.10.28
D:\Programmes and Files\atom [master]> npm --version
1.4.9
D:\Programmes and Files\atom [master]> python --version
Python 2.7.6
D:\Programmes and Files\atom [master]> .\script\build
D:\Programmes and Files\atom [master]>
@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 2, 2014

Member

@strugee Are you experiencing this issue still or does the latest master branch work for you?

Member

kevinsawicki commented Jun 2, 2014

@strugee Are you experiencing this issue still or does the latest master branch work for you?

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 4, 2014

Member

@ArabCoders and @Gullanshire Are either of you still experiencing this problem after pulling from master?

Member

kevinsawicki commented Jun 4, 2014

@ArabCoders and @Gullanshire Are either of you still experiencing this problem after pulling from master?

@strugee

This comment has been minimized.

Show comment
Hide comment
@strugee

strugee Jun 5, 2014

Contributor

@kevinsawicki there's been a slight improvement.

C:\Users\SAAS Student\Development> git clone git://github.com/atom/atom.git
Cloning into 'atom'...
remote: Reusing existing pack: 101124, done.
remote: Counting objects: 162, done.
remote: Compressing objects: 78% (127/162) Receiving objects: 0% (1/101286)
remote: Compressing objects: 100% (162/162), done.
Remote: Total 101286 (delta 99), reused 1 (delta 0)eceiving objects: 100% (1012
Receiving objects: 100% (101286/101286), 239.12 MiB | 165.00 KiB/s, done.

Resolving deltas: 100% (70726/70726), done.
Checking connectivity... done
Checking out files: 100% (389/389), done.
C:\Users\SAAS Student\Development> cd .\atom
C:\Users\SAAS Student\Development\atom [master]> .\script\build.cmd
Node: v0.10.28
Python: v2.7.5
C:\Users\SAAS Student\Development\atom [master]>

It did something, just not something useful.

Contributor

strugee commented Jun 5, 2014

@kevinsawicki there's been a slight improvement.

C:\Users\SAAS Student\Development> git clone git://github.com/atom/atom.git
Cloning into 'atom'...
remote: Reusing existing pack: 101124, done.
remote: Counting objects: 162, done.
remote: Compressing objects: 78% (127/162) Receiving objects: 0% (1/101286)
remote: Compressing objects: 100% (162/162), done.
Remote: Total 101286 (delta 99), reused 1 (delta 0)eceiving objects: 100% (1012
Receiving objects: 100% (101286/101286), 239.12 MiB | 165.00 KiB/s, done.

Resolving deltas: 100% (70726/70726), done.
Checking connectivity... done
Checking out files: 100% (389/389), done.
C:\Users\SAAS Student\Development> cd .\atom
C:\Users\SAAS Student\Development\atom [master]> .\script\build.cmd
Node: v0.10.28
Python: v2.7.5
C:\Users\SAAS Student\Development\atom [master]>

It did something, just not something useful.

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 5, 2014

Member

Can you try moving the cloned repository to C:\atom just to make sure there aren't any issues with long paths?

After that, please run script/clean before running script/build again.

Member

kevinsawicki commented Jun 5, 2014

Can you try moving the cloned repository to C:\atom just to make sure there aren't any issues with long paths?

After that, please run script/clean before running script/build again.

@cheolgook

This comment has been minimized.

Show comment
Hide comment
@cheolgook

cheolgook Jun 5, 2014

Seems like I'm having the same problem, getting nothing when I run script/build. But when I run script/build.cmd, I'm getting this message.

$ script/build.cmd
script/build.cmd: line 1: syntax error near unexpected token `('
script/build.cmd: line 1: `@IF EXIST "%~dp0\node.exe" ('

FYI, I'm running it in git bash, and I have cygwin installed. Does it matter?

cheolgook commented Jun 5, 2014

Seems like I'm having the same problem, getting nothing when I run script/build. But when I run script/build.cmd, I'm getting this message.

$ script/build.cmd
script/build.cmd: line 1: syntax error near unexpected token `('
script/build.cmd: line 1: `@IF EXIST "%~dp0\node.exe" ('

FYI, I'm running it in git bash, and I have cygwin installed. Does it matter?

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 5, 2014

Member

@cheolgook What version of windows? And can you run node -v and see what that displays?

Member

kevinsawicki commented Jun 5, 2014

@cheolgook What version of windows? And can you run node -v and see what that displays?

@cheolgook

This comment has been minimized.

Show comment
Hide comment
@cheolgook

cheolgook Jun 5, 2014

It's windows 7, and node v0.10.28.

$ node -v
v0.10.28

cheolgook commented Jun 5, 2014

It's windows 7, and node v0.10.28.

$ node -v
v0.10.28
@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 5, 2014

Member

Hmm, I'm really unsure why that syntax error is happening, perhaps it is some sort of line endings issue? I'm not sure how strict .cmd files are in regards to those.

Member

kevinsawicki commented Jun 5, 2014

Hmm, I'm really unsure why that syntax error is happening, perhaps it is some sort of line endings issue? I'm not sure how strict .cmd files are in regards to those.

@kevinsawicki

This comment has been minimized.

Show comment
Hide comment
@kevinsawicki

kevinsawicki Jun 5, 2014

Member

@paulcbetts Any pro tips about what @cheolgook's error might signify?

Member

kevinsawicki commented Jun 5, 2014

@paulcbetts Any pro tips about what @cheolgook's error might signify?

@cheolgook

This comment has been minimized.

Show comment
Hide comment
@cheolgook

cheolgook Jun 5, 2014

I added console.log into script/utils/child-process-wrapper.js and got this.

$ script/build
Python 2.7 is required to build Atom. An error (Error: spawn ENOENT) occured whe
n checking the version of 'python'. Set the PYTHON env var to '/path/to/Python27
/python.exe' if your python is installed in a non-default location.
{ [Error: Command failed: ] killed: false, code: 1, signal: null }

Found that in git bash, node is working but it says it can't find python. I have python 2.7 installed on my box so now I'm just trying to reinstall it. And I think we can ignore that build.cmd issue.

cheolgook commented Jun 5, 2014

I added console.log into script/utils/child-process-wrapper.js and got this.

$ script/build
Python 2.7 is required to build Atom. An error (Error: spawn ENOENT) occured whe
n checking the version of 'python'. Set the PYTHON env var to '/path/to/Python27
/python.exe' if your python is installed in a non-default location.
{ [Error: Command failed: ] killed: false, code: 1, signal: null }

Found that in git bash, node is working but it says it can't find python. I have python 2.7 installed on my box so now I'm just trying to reinstall it. And I think we can ignore that build.cmd issue.

@paulcbetts

This comment has been minimized.

Show comment
Hide comment
@paulcbetts

paulcbetts Jun 5, 2014

Contributor

@kevinsawicki That error message means Bash is trying to execute a CMD script directly (i.e. as a Bash script).

One thing I noticed above is that your PATH is hella long, paths are limited to a certain number of characters before Weird Stuff™ starts happening - not sure if this is why you're seeing this but you might try it with a clean PATH.

Contributor

paulcbetts commented Jun 5, 2014

@kevinsawicki That error message means Bash is trying to execute a CMD script directly (i.e. as a Bash script).

One thing I noticed above is that your PATH is hella long, paths are limited to a certain number of characters before Weird Stuff™ starts happening - not sure if this is why you're seeing this but you might try it with a clean PATH.

@cheolgook

This comment has been minimized.

Show comment
Hide comment
@cheolgook

cheolgook Jun 5, 2014

After a few more script/clean and script/build, I can confirm that I'm now having that pathwatcher problem :)

Edit: Apparently, it's not only pathwatcher, everytime I run script/build, I'm hitting problems with different node packages.

cheolgook commented Jun 5, 2014

After a few more script/clean and script/build, I can confirm that I'm now having that pathwatcher problem :)

Edit: Apparently, it's not only pathwatcher, everytime I run script/build, I'm hitting problems with different node packages.

@paulcbetts

This comment has been minimized.

Show comment
Hide comment
@paulcbetts

paulcbetts Jun 5, 2014

Contributor

@cheolgook My psychic debugger says that you're hitting Path length limits and you should try cloning to C:\atom

Contributor

paulcbetts commented Jun 5, 2014

@cheolgook My psychic debugger says that you're hitting Path length limits and you should try cloning to C:\atom

@cheolgook

This comment has been minimized.

Show comment
Hide comment
@cheolgook

cheolgook Jun 5, 2014

@paulcbetts But I'm already in C:\atom though

cheolgook commented Jun 5, 2014

@paulcbetts But I'm already in C:\atom though

@paulcbetts

This comment has been minimized.

Show comment
Hide comment
@paulcbetts

paulcbetts Jun 5, 2014

Contributor

My Psychic Debugger always reserves the right to be incorrect:

Contributor

paulcbetts commented Jun 5, 2014

My Psychic Debugger always reserves the right to be incorrect:

@strugee

This comment has been minimized.

Show comment
Hide comment
@strugee

strugee Jun 6, 2014

Contributor

@kevinsawicki @paulcbetts I moved to C:\atom; ran script\build. It ran for about a half an hour before my computer died. Am trying it again now, will let you know how it goes.

Contributor

strugee commented Jun 6, 2014

@kevinsawicki @paulcbetts I moved to C:\atom; ran script\build. It ran for about a half an hour before my computer died. Am trying it again now, will let you know how it goes.

@strugee

This comment has been minimized.

Show comment
Hide comment
@strugee

strugee Jun 6, 2014

Contributor

Yep, it was the long pathnames. Everything works beautifully now. There should probably be a note in the Windows README; I'll submit a pull request.

Contributor

strugee commented Jun 6, 2014

Yep, it was the long pathnames. Everything works beautifully now. There should probably be a note in the Windows README; I'll submit a pull request.

@icemanphd

This comment has been minimized.

Show comment
Hide comment
@icemanphd

icemanphd Jun 10, 2014

can anyone confirm how long script/build takes to run?

icemanphd commented Jun 10, 2014

can anyone confirm how long script/build takes to run?

@rtconner

This comment has been minimized.

Show comment
Hide comment
@rtconner

rtconner Jun 12, 2014

I was having this same issue. I forgot to install python apparently.

rtconner commented Jun 12, 2014

I was having this same issue. I forgot to install python apparently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment