First "official" NodeJS build on Windows(blog.nodejs.org)
blog.nodejs.org
First "official" NodeJS build on Windows
http://blog.nodejs.org/2011/07/14/node-v0-5-1/
9 comments
I absolutely love the fact that its just a single exe and not some bloated install. I wish more win software was built like this.
Why? If you use someone else's library there's going to be a dll associated. Node doesn't have any dependencies.
Does a javascript engine like V8 have to be installed separately to avoid dependency issues?
Microsoft has the Chakra engine but as far as I know it was running inside IE only.
Microsoft has the Chakra engine but as far as I know it was running inside IE only.
V8 is open source, so it's compiled into Node. But I don't even compile open-source libraries into my windows assemblies. That seems like an incredible waste of time for little benefit.
The distribution & install story is better w/ a single statically linked exe (imo of course). Not to mention installing node for development and on servers. When everything is in one place it's just so easy.
I think the benefit is huge and don't see how it's a waste of time. Node is linked to specific V8 versions, it makes sense to include it.
I think the benefit is huge and don't see how it's a waste of time. Node is linked to specific V8 versions, it makes sense to include it.
Case in point: putty.exe
It's compiled into Node.
Yeah there will be plenty off issues using npm. The native npm packages will most likely break. Npm has support for binary builds but I'm not sure most packages will have a completely separate build process set up for windows.
In the case of the mongodb package I'm deprecating the c++ bson parser as the js parser is as fast or faster than the c++ bson parser (v8 crankshaft and fast arrays rock) and this "should" make it work out of the box on the windows node.js build (crossing fingers)
In the case of the mongodb package I'm deprecating the c++ bson parser as the js parser is as fast or faster than the c++ bson parser (v8 crankshaft and fast arrays rock) and this "should" make it work out of the box on the windows node.js build (crossing fingers)
This is great. That means both Node.js and Coffeescript should now be natively available on Windows.
That was quick! Wasn't this just announced in June?
http://blog.nodejs.org/2011/06/23/porting-node-to-windows-wi...
http://blog.nodejs.org/2011/06/23/porting-node-to-windows-wi...
Unless you are deploying on Windows, why not run it under cygwin? You may end up with a lot of silly problems with file paths, case insensitivity and any other "impedance mismatch" between your development environment and whatever server the workload will run on.
I did a lot of Django development on Windows and Cygwin saved me a whole lot of pain.
I did a lot of Django development on Windows and Cygwin saved me a whole lot of pain.
In my opinion, if you are developing for a Linux deployment on Windows it's easier to use VirtualBox to host a Linux OS.
(That goes out the window if you are talking about performance testing of course.)
(That goes out the window if you are talking about performance testing of course.)
My first corporate issued laptop wasn't beefy enough to run Linux under a VM. Besides, it's convenient to have everything under one file space (moving things to and from the VM tends to be a pain - and if you get your email on Windows, important files will be, more often than not - on the wrong side). Add to that the fact Cygwin gives Windows a bunch of nice tools, langauges and a decent shell and windowed console.
I just tried to install node on cygwin and it failed with this error:
------
src/uv-cygwin.c:33: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
src/uv-cygwin.c:33: error: (Each undeclared identifier is reported only once
src/uv-cygwin.c:33: error: for each function it appears in.)
make[1]: * [src/uv-platform.o] Error 1
------
src/uv-cygwin.c:33: error: ‘CLOCK_MONOTONIC’ undeclared (first use in this function)
src/uv-cygwin.c:33: error: (Each undeclared identifier is reported only once
src/uv-cygwin.c:33: error: for each function it appears in.)
make[1]: * [src/uv-platform.o] Error 1
It's been fixed in master. 0.5.2 comes out tomorrow (if all goes well) and will also contain the fix.
https://github.com/joyent/libuv/issues/112 for details.
https://github.com/joyent/libuv/issues/112 for details.
Thank you - that's great news. I'll keep an eye out for it.
I think you need cygwin 1.7.6 or newer to support CLOCK_MONOTONIC: http://www.cygwin.com/cygwin-ug-net/ov-new1.7.html
Just a note, I use Node across Linux, OSX, and Cygwin on windows. I have zero problems with a NPM lib of 40+ modules. Everything from connect to bcrypt.
I have abandoned Windows again a couple years back, but, from my experience, most stuff that compiles cleanly under Linux, compiles cleanly under Cygwin. Do you have the required libraries? What did configure say? Can you try an older version (one known to work) to see if it compiles?
I/O Completion Ports abstraction is here:
https://github.com/joyent/libuv
Just throwing it out there, but what is the real reason behind making it windows friendly? Do developers want it or is it done with intentions to make it more appealing for corporate absorption?
http://nodejs.org/nodeconf.pdf
With IO Completion Ports, the Windows kernel lends itself more to async server programming than Unix threads, Microsoft has committed to Joyent's port and with many developers working with Windows on their development boxes, even if they later deploy to a Linux environment, a windows port just makes sense.
With IO Completion Ports, the Windows kernel lends itself more to async server programming than Unix threads, Microsoft has committed to Joyent's port and with many developers working with Windows on their development boxes, even if they later deploy to a Linux environment, a windows port just makes sense.
I shudder at the thought of writing Node apps in Windows only to later deploy them to a Linux environment. Sounds like a debugging nightmare.
Didn't we learn these lessons from the early days of Java when it was "write once, debug everywhere"?
Didn't we learn these lessons from the early days of Java when it was "write once, debug everywhere"?
I work at a Windows shop, and this comes at a good time for us, as node would scratch an itch, but prior to the Windows release, would have required additional infrastructure to use.
Well... windows is a pretty popular operating system.
There are definitely use cases. My last employer worked on browser based gaming, and we were forced onto Windows because most of the games we needed to support and work with only ran on Windows. I had a really hard tine getting any significant adoption of Node because running it on Windows was difficult.
Node.js looks interesting and I may take a look at it. I would never install a different operating system just to try it out though.
[deleted]
Millions more developers can now play with it at work. Granted they could have been using a VM up to now but for many their machine can't handle a Java based IDE (Eclipse, Netbeans) within a VM.
Millions of developers have been able to play with it since the first release - Node likely ran under Cygwin just fine from the start.
And you don't need VMs to run Java-based IDEs on Windows - there is a native JDK you can download from Oracle and Windows runs Eclipse and Netbeans acceptably.
And you don't need VMs to run Java-based IDEs on Windows - there is a native JDK you can download from Oracle and Windows runs Eclipse and Netbeans acceptably.
The reason Twisted is available on Win32 is because (a) there are developers willing to test and maintain the OS-specific support for Win32, and (b) some people deploy apps which use Twisted as their general networking stack. (Deluge is one popular example of a Twisted-powered GUI app.)
I bet the former is the big reason; I don't think people write full user apps with GUIs in Node very often.
I bet the former is the big reason; I don't think people write full user apps with GUIs in Node very often.
Still lots of bugs and many features are not supported. But it is good to know they are working actively on this.
Did anyone manage to get npm up and running on Windows yet?
No, there are still a number of issues with NPM support on windows. Isaacs talks about them on the latest NodeUp podcast: http://nodeup.com/
Check out ryppi for bare-bones package installation, though: https://github.com/japj/ryppi