Skip to content
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

Install fails on Windows 10 #868

Closed
p-adams opened this issue Dec 2, 2016 · 13 comments
Closed

Install fails on Windows 10 #868

p-adams opened this issue Dec 2, 2016 · 13 comments

Comments

@p-adams
Copy link

p-adams commented Dec 2, 2016

I have tried several times to install and run the example project; however, I keep getting this:

npm WARN addRemoteGit Error: Command failed: git -c core.longpaths=true config --get remote.origin.url npm WARN addRemoteGit npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:206:12) npm WARN addRemoteGit at emitTwo (events.js:106:13) npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7) npm WARN addRemoteGit at maybeClose (internal/child_process.js:877:16) npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npm WARN addRemoteGit git+https://github.com/npm-opam/ocaml.git#npm-4.02.3 resetting remote C:\Users\paadams\AppData\Roaming\npm-cache\_git-remotes\git-https-github-com-npm-opam-ocaml-git-npm-4-02-3-668766b2 because of error: { Error: Command failed: git -c core.longpaths=true config --get remote.origin.url npm WARN addRemoteGit npm WARN addRemoteGit at ChildProcess.exithandler (child_process.js:206:12) npm WARN addRemoteGit at emitTwo (events.js:106:13) npm WARN addRemoteGit at ChildProcess.emit (events.js:191:7) npm WARN addRemoteGit at maybeClose (internal/child_process.js:877:16) npm WARN addRemoteGit at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) npm WARN addRemoteGit killed: false, npm WARN addRemoteGit code: 1, npm WARN addRemoteGit signal: null, npm WARN addRemoteGit cmd: 'git -c core.longpaths=true config --get remote.origin.url' }

I either get that error or my terminal just hangs when trying to npm install

@alaingalvan
Copy link

I've been able to get Reason working on Ubuntu bash on Windows with both the npm installation and the opam installation:

reason-winbash

Here's a quick link on how to install it.

Bear in mind, this is effectively just installing Reason on Linux and running it on Windows,

@OvermindDL1
Copy link

Bear in mind, this is effectively just installing Reason on Linux and running it on Windows,

Does not help us that run on Windows 2008 or need integration with Windows programs. ;-)

@p-adams
Copy link
Author

p-adams commented Dec 2, 2016

Yeah. I am unable to update my version of Windows 10. So I cannot take advantage of WinBash, unfortunately.

@ghost
Copy link

ghost commented Dec 11, 2016

I too can install the ExampleProject in the linux subsystem. Is there a way to use the atom from windows with this with autocomplete etc?

@janicduplessis
Copy link

Also tried running in on windows linux subsystem and get this error when building fastrealpath:

> fastrealpath@0.1.0 postinstall /mnt/c/Users/janic/Developer/ReasonProject/node_modules/fastrealpath
> gcc -o ./.bin/realpath -x c - <<< $'#include<stdlib.h>
main(int cc, char**vargs){
  puts(realpath(vargs[1], 0));
}'

sh: 1: Syntax error: redirection unexpected

[...]

npm ERR! Linux 3.4.0+
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "i"
npm ERR! node v7.2.1
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! fastrealpath@0.1.0 postinstall: `gcc -o ./.bin/realpath -x c - <<< $'#include<stdlib.h>
npm ERR! main(int cc, char**vargs){
npm ERR!   puts(realpath(vargs[1], 0));
npm ERR! }'`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the fastrealpath@0.1.0 postinstall script 'gcc -o ./.bin/realpath -x c - <<< $'#include<stdlib.h>
npm ERR! main(int cc, char**vargs){
npm ERR!   puts(realpath(vargs[1], 0));
npm ERR! }''.
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 fastrealpath package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     gcc -o ./.bin/realpath -x c - <<< $'#include<stdlib.h>
npm ERR! main(int cc, char**vargs){
npm ERR!   puts(realpath(vargs[1], 0));
npm ERR! }'
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs fastrealpath
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls fastrealpath
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /mnt/c/Users/janic/Developer/ReasonProject/npm-debug.log

Note: to get to this point I had to install build-essential and m4.

@bobzhang
Copy link
Contributor

Curious which part of reason depends on m4

@janicduplessis
Copy link

janicduplessis commented Dec 19, 2016

Looked up the issue a bit and it happens because ubuntu uses dash instead of bash when running sh

Fixed it by running

sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh

Now everything works so in summary to get in work on a fresh windows linux subsystem install I had to

sudo apt-get install build-essential m4
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh

@yunxing
Copy link
Contributor

yunxing commented Dec 22, 2016

@bobzhang Just saw this. I think ocamlfind uses m4.

@bobzhang
Copy link
Contributor

should not it be a dev dependency only?

@jordwalke
Copy link
Member

@bobzhang Are you asking about m4 specifically?

@janicduplessis What do we have to do to make sure everything works out of the box for winbash?

@bobzhang
Copy link
Contributor

@jordwalke I am talking about ocamlfind, does reason rely on it for building

@jordwalke
Copy link
Member

jordwalke commented Dec 24, 2016

Bob it looks like we depend on it in a couple of unimportant places. I bet we could rip that dependency out! Good find. We are looking to reduce the size of dependencies.
Though I think most people are going to need ocamlfind to build some package they depend on. It's the most common dependency of all the OCaml dependencies. We can still remove it as a reason dep, but we should also make sure m4 also works. We can package into a sandbox and avoid compiling it if it is already available.

@chenglou
Copy link
Member

chenglou commented Oct 11, 2017

Closing this in favor of the centralized thread at reasonml/reasonml.github.io#195. Sorry for all these installations folks...

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

No branches or pull requests

8 participants