npm ERR! Error: UNKNOWN, symlink '../coffee-script/bin/coffee'

230 views
Skip to first unread message

Shravan P

unread,
Oct 25, 2014, 8:53:49 PM10/25/14
to edx-...@googlegroups.com

When I run 'vagrant up' I get the following error message:

==> default: TASK: [edxapp | Install edx-platform npm dependencies] ************************
==> default: failed: [localhost] => {"changed": true, "cmd": "npm install ", "delta": "0:00:02.596228", "end": "2014-10-25 20:10:23.201682", "item": "", "rc": 255, "start": "2014-10-25 20:10:20.605454"}
==> default: stderr: npm WARN package.json edx@0.1.0 No repository field.
==> default: npm ERR! Error: UNKNOWN, symlink '../coffee-script/bin/coffee'
==> default: npm ERR! If you need help, you may report this *entire* log,
==> default: npm ERR! including the npm and node versions, at:
==> default: npm ERR!     <http://github.com/npm/npm/issues>
==> default:
==> default: npm ERR! System Linux 3.2.0-23-generic
==> default: npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
==> default: npm ERR! cwd /edx/app/edxapp/edx-platform
==> default: npm ERR! node -v v0.10.31
==> default: npm ERR! npm -v 1.4.23
==> default: npm ERR! path ../coffee-script/bin/coffee
==> default: npm ERR! code UNKNOWN
==> default: npm ERR! errno -1
==> default: npm ERR!
==> default: npm ERR! Additional logging details can be found in:
==> default: npm ERR!     /edx/app/edxapp/edx-platform/npm-debug.log
==> default: npm ERR! not ok code 0
==> default:
==> default: FATAL: all hosts have already failed -- aborting
==> default:
==> default: PLAY RECAP ********************************************************************
==> default:            to retry, use: --limit @/root/vagrant-devstack.retry
==> default: localhost                  : ok=21   changed=7    unreachable=0    failed=1



I followed the trouble shooting guide from here: https://github.com/edx/configuration/wiki/Vagrant-troubleshooting
which refers to the solution from here: http://stackoverflow.com/a/16754068/1265417
but it doesnt help. I still get the same error message.

Anybody knows how to get around this problem?

Yarko Tymciurak

unread,
Oct 25, 2014, 10:25:47 PM10/25/14
to edx-...@googlegroups.com

Yarko Tymciurak

unread,
Oct 25, 2014, 10:29:30 PM10/25/14
to edx-...@googlegroups.com


On Sat, Oct 25, 2014 at 9:25 PM, Yarko Tymciurak <yar...@gmail.com> wrote:

Sorry - missed your comment on the stackoverflow - I'd suggest the cygwin approach.
It can take a while, but it will in the end be easier... 

Shravan P

unread,
Oct 26, 2014, 3:22:33 AM10/26/14
to edx-...@googlegroups.com
I am using cygwin to execute the git commands related to symlinks as mentioned in stackover:
git rm --cached -r . && git reset --hard
 git config --global alias.add-symlink '!__git_add_symlink(){ dst=$(echo "$2")/../$(echo "$1"); if [ -e "$dst" ]; then hash=$(echo "$1" | git hash-object -w --stdin); git update-index --add --cacheinfo 120000 "$hash" "$2"; git checkout -- "$2"; else echo "ERROR: Target $dst does not exist!"; echo "       Not creating invalid symlink."; fi; }; __git_add_symlink "$1" "$2"'
 git config --global alias.rm-symlink '!__git_rm_symlink(){ git checkout -- "$1"; link=$(echo "$1"); POS=$'\''/'\''; DOS=$'\''\\\\'\''; doslink=${link//$POS/$DOS}; dest=$(dirname "$link")/$(cat "$link"); dosdest=${dest//$POS/$DOS}; if [ -f "$dest" ]; then rm -f "$link"; cmd //C mklink //H "$doslink" "$dosdest"; elif [ -d "$dest" ]; then rm -f "$link"; cmd //C mklink //J "$doslink" "$dosdest"; else echo "ERROR: Something went wrong when processing $1 . . ."; echo "       $dest may not actually exist as a valid target."; fi; }; __git_rm_symlink "$1"'
 git config --global alias.rm-symlinks '!__git_rm_symlinks(){ for symlink in `git ls-files -s | grep -E "^120000" | cut -f2`; do git rm-symlink "$symlink"; git update-index --assume-unchanged "$symlink"; done; }; __git_rm_symlinks'
 git config --global alias.checkout-symlinks '!__git_checkout_symlinks(){ POS=$'\''/'\''; DOS=$'\''\\\\'\''; for symlink in `git ls-files -s | grep -E "^120000" | cut -f2`; do git update-index --no-assume-unchanged "$symlink"; if [ -d "$symlink" ]; then dossymlink=${symlink//$POS/$DOS}; cmd //C rmdir //S //Q "$dossymlink"; fi; git  checkout -- "$symlink"; echo "Restored git symlink $symlink <<===>> `cat $symlink`"; done; }; __git_checkout_symlinks'
 git rm-symlinks
Is there anything else I am supposed to do?

cygwin version: 1.7.32
Vagrant version: 1.6.5

Thanks.

Yarko Tymciurak

unread,
Oct 26, 2014, 2:05:38 PM10/26/14
to edx-...@googlegroups.com
I'm sorry - I didn't really do you a service (and this looks more complicated now than I remember).

Perhaps someone working on windows can confirm what works, how to do this.

My recollection is that cygwin handles symlinks (and has options to create windows compatible ones - see https://cygwin.com/cygwin-ug-net/using-effectively.html), and that if you run git from within cygwin should use cygwin's bash shell, and thus it should all just work (see this for how to install git from cygwin: http://stackoverflow.com/questions/15692890/running-git-through-cygwin-from-windows).

I don't currently have a windows machine, so I'm not sure if this will help (someone doing development on windows can tell you) - but I did use cygwin for many years on windows, and this would be the simplest, first way I would try it:

install cygwin;
from cygwin, in stall git

I'm not sure about ruby/vagrant - if they will try to pull up windows shells (thereby breaking the chain), but you can be sure to configure scripts so they always use the path for cygwin's bash shell.

Regards,
Yarko

Shravan P

unread,
Oct 26, 2014, 4:27:58 PM10/26/14
to edx-...@googlegroups.com
Hello Yarko,

Appreciate the help. I was using git for windows (version 1.9.4) for other projects and later I installed cygwin. I am able to run git commands from within cygwin and it uses the git I installed before. And as per this post: http://stackoverflow.com/questions/783906/git-under-windows-msys-or-cygwin So I dont think I need to install git from cygwin again. 

I set the CYGWIN env variable in windows to both winsymlinks:lnk and winsymlinks:native and tried the git symlink commands I mentioned in my previous post. But "vagrant up" command still throws the same exception. 

As per their troubleshooting guide, those commands should solve the problem. Either its a version mismatch and something changed along the line or I am doing something terribly wrong.

Thanks,
Shravan

Yarko Tymciurak

unread,
Oct 26, 2014, 10:44:26 PM10/26/14
to edx-...@googlegroups.com


On Oct 26, 2014 3:28 PM, "Shravan P" <shrava...@gmail.com> wrote:
>
> Hello Yarko,
>
> Appreciate the help. I was using git for windows (version 1.9.4) for other projects and later I installed cygwin. I am able to run git commands from within cygwin and it uses the git I installed before. And as per this post: http://stackoverflow.com/questions/783906/git-under-windows-msys-or-cygwin So I dont think I need to install git from cygwin again. 

I think you are missing a fundamental concept here: I _think_ you _do_ need to install the second git.

Here's why I believe that must be so:

The windows git executable was linked with the windows equivalent of POSIX file system library.  This is why it generally just works in windows, regardless of which shell you use: windows' own cmd, or the cygwin bash.

On the other hand, the cygwin git is linked against cygwin's file system libraries, which are an adapted version (I'm expecting) of POSIX and/or gnu libraries, as they were modified by cygwin to work inside of windows.  You will note in one of the links I sent (advanced) , that cygwin mentioned it makes symlinks which windows can use (will work in windows) but which do not contain as much information as windows created ones (notably icon/images, as I recall).

So I respectfully disagree.

I expect that, for easiest use, you _must_ install the cygwin git and use it from within cygwin bash.  I expect everything done in this way will be much easier.

Best regards,
Yarko

>>>>>> ==> default: stderr: npm WARN package.json e...@0.1.0 No repository field.

Yarko Tymciurak

unread,
Oct 26, 2014, 10:50:15 PM10/26/14
to edx-...@googlegroups.com

...and I would add, install the entire package of command line tools with cygwin, add git, and then start fresh - from an empty directory, a new devstack attempt. The git chexked-out repos must be exclusively created and manipulated, throughout, by only the cygwin git, from the cygwin bash shell only.

lars.j.a...@chalmers.se

unread,
Oct 27, 2014, 3:49:56 AM10/27/14
to edx-...@googlegroups.com
I am also wrestling with the devstack on Windows 8.1. Got it working after following the bottom post https://github.com/edx/configuration/issues/659.

Shravan P

unread,
Oct 30, 2014, 3:06:03 PM10/30/14
to edx-...@googlegroups.com
Thanks for the help guys. I got done with my midterms and am back on this. 

@Yarko,
I started from scratch after installing git via cygwin but I ended up with the same error. I'm not sure how the devstack guys didnt face this issue on windows..

@Andersson,
I followed that post. I am running Windows 8.1 home edition and I dont have secpol.msc and gpedit.msc. I did find this post http://www.askvg.com/how-to-enable-group-policy-editor-gpedit-msc-in-windows-7-home-premium-home-basic-and-starter-editions/ which explains how to enable that feature but I need to install a "setup.exe". Call me paranoid but I don't want to run a random "setup.exe" found on some forum! Either I pay 100$ and upgrade to windows 8.1 pro or use that setup.exe. I dont think either options are viable. If you are aware of how I can get this done in any other way, kindly let me know.

Regards,
Shravan

chemseddine zaafrane

unread,
Jan 22, 2017, 10:35:32 PM1/22/17
to General Open edX discussion
3 years later :p ... i'm getting the same errors as yours and i'm running the same commands in cygwin and when i try to run vagrant a second time i get an error saying
==> default: TASK: [edxapp | checkout edx-platform repo into {{ edxapp_code_dir
}}] ********
==> default: failed: [localhost] => {"failed": true}
==> default: msg: Local modifications exist in repository (force=no).
Reply all
Reply to author
Forward
0 new messages