Node.js Windows Installation

39 views
Skip to first unread message

Marak Squires

unread,
Nov 23, 2009, 11:56:02 AM11/23/09
to nodejs
Any suggestions for how to get node.js working in windows? What steps
would have to be taken?

Obviously I don't intend on running a windows server, but it would be
nice to able to setup a node.js development environment on a windows
machine.

Joshaven Potter

unread,
Nov 24, 2009, 1:21:10 PM11/24/09
to nod...@googlegroups.com
So here is your not so much an answer, answer...

Yah... download VirtualBox and the Ubuntu server ISO and run Linux on your Windows machine...

You can even setup Samba on the Ubuntu server and map a drive on windows to the project directory on the Linux server... that way you can use Windows based text editors, browsers, and such if you like...






--

You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.





--
Sincerely,
Joshaven Potter

"No man making a profession of faith ought to sin, nor one possessed of love to hate his brother. For He that said, “Thou shalt love the Lord thy God,”  said also, “and thy neighbor as thyself.”  Those that profess themselves to be Christ’s are known not only by what they say, but by what they practice. “For the tree is known by its fruit.”" -- Ignatius

Marak Squires

unread,
Nov 24, 2009, 1:34:45 PM11/24/09
to nod...@googlegroups.com
I started setting up Mingw and Msys and promptly gave up after about 30 minutes.

To my understanding there are some issues getting WAF to work on Windows, but I really didn't look too far into it.

Wound up just using a rackspace cloud server instance for the time being.

Joshaven Potter

unread,
Nov 24, 2009, 1:41:11 PM11/24/09
to nod...@googlegroups.com
If you want to pay for your server environment then your welcome to but setting up a VM running Ubuntu is really not hard!!!

I would NOT recommend filing you windows full of *nix emulators and crap... Why make windows try to be Linux when you can just have Windows run Linux?

Here is a how to get Ubuntu running on your Windows machine with screen shots:

I've done it and it is exceedingly easy and the final product is great!

Marak Squires

unread,
Nov 24, 2009, 1:43:36 PM11/24/09
to nod...@googlegroups.com
Thank you, I will look into this in the future for sure.

mtyson

unread,
Dec 6, 2009, 1:23:38 PM12/6/09
to nodejs
I gave a quick attempt at running node in msys/mingw and cygwin before
switching to a ubuntu/virtualbox setup.

Look like execinfo isn't in the cygwin libs. Not sure what the deal
is with gnutls, as cygwin has them installed (not sure where that path
is that node ./configure is looking). Not sure re pthreads_atfork
either.

Here's cygwin:

$ ./configure
Checking for program g++,c++ : ok /usr/bin/g++
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc,cc : ok /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : ok
Checking for library execinfo : not found
Checking for gnutls >= 2.5.0 : /bin/sh: pkg-config:
command not found
fail
--- libeio ---
Checking for library pthread : ok
Checking for function pthread_create : ok
Checking for function pthread_atfork : not found

And here is msys:

$ ./configure
Checking for program g++,c++ : ok /usr/bin/g++
Checking for program cpp : ok /usr/bin/cpp
Checking for program ar : ok /usr/bin/ar
Checking for program ranlib : ok /usr/bin/ranlib
Checking for g++ : ok
Checking for program gcc,cc : ok /usr/bin/gcc
Checking for gcc : ok
Checking for library dl : ok
Checking for library execinfo : not found
Checking for gnutls >= 2.5.0 : /bin/sh: pkg-config:
command not found
fail
--- libeio ---
Checking for library pthread : ok
Checking for function pthread_create : ok
Checking for function pthread_atfork : not found

The fact that msys is looking for msvc makes me nervous ;)

matt

On Nov 24, 12:43 pm, Marak Squires <marak.squi...@gmail.com> wrote:
> Thank you, I will look into this in the future for sure.
>
> On Tue, Nov 24, 2009 at 1:41 PM, Joshaven Potter <yourt...@gmail.com> wrote:
> > If you want to pay for your server environment then your welcome to but
> > setting up a VM running Ubuntu is really not hard!!!
>
> > I would NOT recommend filing you windows full of *nix emulators and crap...
> > Why make windows try to be Linux when you can just have Windows run Linux?
>
> > Here is a how to get Ubuntu running on your Windows machine with screen
> > shots:
> >http://www.psychocats.net/ubuntu/virtualbox
>
> > I've done it and it is exceedingly easy and the final product is great!
>
> > On Tue, Nov 24, 2009 at 1:34 PM, Marak Squires <marak.squi...@gmail.com>wrote:
>
> >> I started setting up Mingw and Msys and promptly gave up after about 30
> >> minutes.
>
> >> To my understanding there are some issues getting WAF to work on Windows,
> >> but I really didn't look too far into it.
>
> >> Wound up just using a rackspace cloud server instance for the time being.
>
> >> On Tue, Nov 24, 2009 at 1:21 PM, Joshaven Potter <yourt...@gmail.com>wrote:
>
> >>> So here is your not so much an answer, answer...
>
> >>> Yah... download VirtualBox and the Ubuntu server ISO and run Linux on
> >>> your Windows machine...
>
> >>> You can even setup Samba on the Ubuntu server and map a drive on windows
> >>> to the project directory on the Linux server... that way you can use Windows
> >>> based text editors, browsers, and such if you like...
>
> >>> On Mon, Nov 23, 2009 at 11:56 AM, Marak Squires <marak.squi...@gmail.com
> >>> > wrote:
>
> >>>> Any suggestions for how to get node.js working in windows? What steps
> >>>> would have to be taken?
>
> >>>> Obviously I don't intend on running a windows server, but it would be
> >>>> nice to able to setup a node.js development environment on a windows
> >>>> machine.
>
> >>>> --
>
> >>>> You received this message because you are subscribed to the Google
> >>>> Groups "nodejs" group.
> >>>> To post to this group, send email to nod...@googlegroups.com.
> >>>> To unsubscribe from this group, send email to
> >>>> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> >>>> .
> >>>> For more options, visit this group at
> >>>>http://groups.google.com/group/nodejs?hl=en.
>
> >>> --
> >>> Sincerely,
> >>> Joshaven Potter
>
> >>> "No man making a profession of faith ought to sin, nor one possessed of
> >>> love to hate his brother. For He that said, “Thou shalt love the Lord thy
> >>> God,”  said also, “and thy neighbor as thyself.”  Those that profess
> >>> themselves to be Christ’s are known not only by what they say, but by what
> >>> they practice. “For the tree is known by its fruit.”" -- Ignatius
>
> >>> --
> >>> You received this message because you are subscribed to the Google Groups
> >>> "nodejs" group.
> >>> To post to this group, send email to nod...@googlegroups.com.
> >>> To unsubscribe from this group, send email to
> >>> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> >>> .
> >>> For more options, visit this group at
> >>>http://groups.google.com/group/nodejs?hl=en.
>
> >>  --
> >> You received this message because you are subscribed to the Google Groups
> >> "nodejs" group.
> >> To post to this group, send email to nod...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/nodejs?hl=en.
>
> > --
> > Sincerely,
> > Joshaven Potter
>
> > "No man making a profession of faith ought to sin, nor one possessed of
> > love to hate his brother. For He that said, “Thou shalt love the Lord thy
> > God,”  said also, “and thy neighbor as thyself.”  Those that profess
> > themselves to be Christ’s are known not only by what they say, but by what
> > they practice. “For the tree is known by its fruit.”" -- Ignatius
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "nodejs" group.
> > To post to this group, send email to nod...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > nodejs+un...@googlegroups.com<nodejs%2Bunsu...@googlegroups.com>
> > .

danielearwicker

unread,
Dec 15, 2009, 6:05:39 AM12/15/09
to nodejs
On Dec 6, 6:23 pm, mtyson <matthewcarlty...@gmail.com> wrote:
> I gave a quick attempt at running node in msys/mingw and cygwin before
> switching to a ubuntu/virtualbox setup.

Me too. I think sadly the posix APIs are different enough from Win32
that the port would not be straightforward, more like a rewrite. Also
I doubt if there would be much appetite for this because (as
previously argued wisely here) why choose to pay for a server
platform?

But on the other hand, I make my living on Windows, and I think
node.js is wonderful, so there's a quandary. I think the pure evented
IO + single threaded event loop pattern is valuable enough to take the
spirit of it and re-implement it in a natively "Windows-ish" way.
Basically copying the style of node.js, but using C# as the language.
This could at least advertise the important ideas to a wider
community.

Here's a rough start:

http://smellegantcode.wordpress.com/2009/12/15/node/

(Don't expect too much, it's just an afternoon's hackery.)

Ryan Dahl

unread,
Dec 15, 2009, 6:31:50 AM12/15/09
to nod...@googlegroups.com
On Tue, Dec 15, 2009 at 12:05 PM, danielearwicker
<daniel.e...@gmail.com> wrote:
> On Dec 6, 6:23 pm, mtyson <matthewcarlty...@gmail.com> wrote:
>> I gave a quick attempt at running node in msys/mingw and cygwin before
>> switching to a ubuntu/virtualbox setup.
>
> Me too. I think sadly the posix APIs are different enough from Win32
> that the port would not be straightforward, more like a rewrite.

What are you talking about?

libev and libeio work on windows - which is the majority of the I/O.
I'm rewriting evcom in js with simple bindings to read(3), write(3),
accept(3), bind(3), etc. All of which are present
http://msdn.microsoft.com/en-us/library/ms737550(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms737550(VS.85).aspx
http://msdn.microsoft.com/en-us/library/ms737550(VS.85).aspx

The stdin/stdout non-blocking coupling is done with pthreads, pipe(), and dup()
http://msdn.microsoft.com/en-us/library/8syseb29(VS.80).aspx
http://sourceware.org/pthreads-win32/
http://msdn.microsoft.com/en-us/library/edze9h7e(VS.71).aspx

V8 and the WAF build system both run on windows. udns too - soon to be
replaced with c-aress which also runs on windows.

The child_process stuff will need to be rewritten as it uses fork().
That's the one chunk that will have to be rewritten from scratch.

It definitely will require some work to port - it would probably take
me 2 weeks, but that's quite different from a rewrite.

danielearwicker

unread,
Dec 15, 2009, 7:00:38 AM12/15/09
to nodejs
On Dec 15, 11:31 am, Ryan Dahl <coldredle...@gmail.com> wrote:
> On Tue, Dec 15, 2009 at 12:05 PM, danielearwicker
>
> <daniel.earwic...@gmail.com> wrote:
> > On Dec 6, 6:23 pm, mtyson <matthewcarlty...@gmail.com> wrote:
> >> I gave a quick attempt at running node in msys/mingw and cygwin before
> >> switching to a ubuntu/virtualbox setup.
>
> > Me too. I think sadly the posix APIs are different enough from Win32
> > that the port would not be straightforward, more like a rewrite.
>
> What are you talking about?
>
> libev and libeio work on windows - which is the majority of the I/O.

Apologies if I misrepresented the the amount of work involved. I
merely meant that it wouldn't be as simple as hacking away at small
problems for a day until it builds, because some portions would need
to be rewritten. That's all I meant by "more like a rewrite."

I'm glad a port is underway anyway.

Elijah Insua

unread,
Dec 15, 2009, 10:15:06 AM12/15/09
to nod...@googlegroups.com
The child_process stuff will need to be rewritten as it uses fork().
That's the one chunk that will have to be rewritten from scratch.
 
Is this because pthread_atfork is currently being used with no windows port?
 
It definitely will require some work to port - it would probably take
me 2 weeks, but that's quite different from a rewrite.

I'd like to help with this process in any way that I can.  I haven't dug into the node internals as of yet (day job), but I intend on doing so shortly.

-- Elijah

Matthew Tyson

unread,
Dec 15, 2009, 12:57:27 PM12/15/09
to nod...@googlegroups.com
Daniel,

I appreciate your update, because I went into setting it up in windows figuring I could work around things with configuration.  Your post let's me and future attempters know the score better when they start.

Matt

--

You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages