Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js Cygwin not supported

I am trying to install node.js. I followed this tutorial and i am stuck in the middle.

When I write ./configure in my cygwin terminal it says "cygwin not supported". Please help me out Thanks in advance.

like image 530
Mj1992 Avatar asked Apr 06 '12 11:04

Mj1992


People also ask

Is Node.js not supported in Windows 7?

Windows 7 reached it's EoL (End-of-Life) phase already as stated here. And we don't publish compatible builds to any of the other operating systems that their vendor has expired support for them as stated here, not just Windows 7. Node. js does not support a platform version if a vendor has expired support for it.

Is Node.js compatible with Windows 7 64 bit?

Node. js runs on different architectures. You can use it on all common operating systems, like Windows, Linux, and macOS. You can also use it on 32-bit and 64-bit machines.


1 Answers

Node in my experience runs fine in cygwin, what Node usually has EINVAL errors in seems to be MINTTY which is a terminal emulation 'skin' that is default to cygwin. I still am not sure why these EINVAL errors happen 100% but the following are the steps and tricks I use to get node working.

In my /cygwin/home/{username}/.bashrc I add node to path so cygwin can find it

export PATH=$PATH:"/cygdrive/c/Program Files/nodejs/" 

If you run a 32 bit version of node:

export PATH=$PATH:"/cygdrive/c/Program Files (x86)/nodejs/" 

Then to make npm run without windows to linux issues I launch cygwin in admin mode then run:

dos2unix '/cygdrive/c/Program Files/nodejs/npm' 

At this point running files and most npm packages will run in MINTTY just fine, although every once and awhile you will run into EINVAL issues with certain npm packages as karma. Also you will not be able to run the interpreter directly in MINTTY, anytime I want to do these things I run:

cygstart /bin/bash 

This will open a native cygwin bash.exe window, from here you run the interpreter or an any troubling package command that results in a EINVAL. It slightly sucks you have to do this but I rarely use this day to day, and I love MINTTY too much to not use it.

Also note that you can run any one line node code in MINTTY by just running something like:

node -e "console.log('hello node')" 
like image 163
troy Avatar answered Sep 23 '22 02:09

troy