4 ms·
I use Node on both OSX and Windows and its definitely broken in Windows or maybe just not a priority to work well. Getting a full stack modern application work
by cozuya 11y ago
I use Node on both OSX and Windows and its definitely broken in Windows or maybe just not a priority to work well. Getting a full stack modern application working on localhost on a Windows machine is really painful and typical requires hours of googling obscure npm i errors.
- rpedela 11y agoI bet. Even though Node claims to work on Windows, most dependencies are built and tested for Linux (or OSX). Just curious, what are the use cases for Node on Windows?
- alxeder 11y agoI think the main use case is developer workstations which run on Windows because of corporate guidlines
- cozuya 11y agoI'm probably the rare developer who prefers the UI and feel of Windows to OSX.. though I am probably a prototypical use case to switch to Mint, but haven't got around to it.
- krisdol 11y agoI feel comfortable with all the UIs, but essentially I want to be as close to my application's production environment as possible, while still being productive. I've never worked on a team where that environment was windows, and setting up node/ruby/docker/vim/bash/nginx in a windows environment has always been a total pain compared to either linux or OS X (still kind of a pain for docker, but slightly less so). For some of these core tools, authors explicitly state that windows is a second class citizen. It's just not worth the expense to support something that has so few comparative users, in some cases (ruby). It's a lot of work for something that will never feel "native".
- sanderjd 11y agoMaybe we're both rare, but I think Windows 7 and Windows 10 are both really nice, as is the Edge browser. I've been considering switching from OSX. It seems like it should be relatively convenient with tools like Vagrant to develop on Windows but run, test, and deploy on Linux. But I haven't tested this hypothesis yet.
- tracker1 11y agoAs long as you get Windows 10 Pro, you get Hyper-V... I have an always-on linux VM that I SSH a few terminals to and map a drive via SAMBA on the VM to my desktop, so I can edit in a windows GUI, but interact in Linux... it works pretty well, and tbh is usually easier than the odd edge case with windows, unless you're a C/C++ guy.
- sanderjd 11y agoThis sounds really cool. I don't know much about Hyper-V and SAMBA – any good links to get me started?
- tracker1 11y agoHyper-V is just a VM environment that comes with some versions of windows... It's not really too much different than VMWare, Parallels or VirtualBox... It does have an option to start in the background on machine start on the desktop version. So I installed Ubuntu Server (latest) in a Virtual Machine via Hyper-V... set it to auto-boot.. setup OpenSSH, setup Samba ... I kind of just muddled through it, to be honest.. after that, I setup Docker, build-essentials and nvm, which covered my needs there. On the windows side, I use Clover as an explorer replacement (file explorer, not the desktop), and use ConEmu for tabbed shell interfaces. It works pretty well for me. I use GUI stuff in windows, and the linux side via SSH.
- sanderjd 11y agoThanks, this is helpful. I'm a seasoned muddler myself, so I'm sure I can figure it out.
- tracker1 11y agoI feel that Windows 7 was really the pinnacle UI for desktops... I kind of dig Unity, as it's similar enough for me. I do prefer a bash prompt to CMD though. I don't think node on Windows is so bad these days once you've got Python 2.x and VS 2015 Community installed... When I started with node (0.6-0.8 era), it was pretty bad in Windows. These days most popular modules just work, or work once you have gyp prereq's installed.
- bronson 11y agoThat's also true of Ruby, Python, Perl, ... Ultimately, if you're on Windows and you want a smooth development experience, you need to use made-for-Windows technologies (notably C# and friends). Hopefully that changes one day.
- mAritz 11y agoWe run a good-sized app API using Typescript with Node.js. Our developers use Linux or Windows. The only real trouble we have with windows are some rare native add-ons like memwatch. We keep our dependencies up-to-date by occasionally running "npm outdated", checking the packages for their Changelog.md (or equivalent) and then enjoying the new stuff. From my perspective you were just unlucky with your packages, or you might be doing something else wrong.
- curun1r 11y agoOr it requires conceding that Windows isn't an appropriate platform for developing unix-focused technologies and running something like Docker or Vagrant to better mimic the environment where the code will eventually be deployed. Most of the developers where I am are running OS X, which is significantly more similar to our Linux production environments than is Windows and yet we determined that it was just easier to always run our node applications on Linux guest VMs. On Windows, I wouldn't even have the gall to try to make it work without this kind of setup.
- paulddraper 11y agoAnd thus JS conceeds "write once, run anywhere".
- Scarbutt 11y agoJS is a programming language not an implementation.
- paulddraper 11y agoSure. "Run anywhere" is really only descriptive of languages (e.g. Java), not implementations (e.g. Dalvik). You can't have a "run anywhere" implementation, unless you are grouping a bunch of implementations together...one for ARM, one for x86, one for FreeBSD, one for Windows, one for Minecraft, etc... because even under the same name the implementations would very significantly internally. "Run anywhere" is a function of (1) the language spec (i.e. how much machine dependent behavior is permitted) and (2) the actual real-world support across platforms. JS has the first, but the second is often conceeded, per the earlier comment.
- novaleaf 11y agoi do my development on windows and my servers are ubuntu. I have had no such problems running. You need to install the proper prereqs for node-gyp, but those are clearly explained on the node-gyp docs.
- tracker1 11y agoI remember it was that way for a long while.. but other than Python 2.x, and having a recent VS (Community Edition works) installed, haven't had many issues... at least no more than I've typically had with Linux. I spend about equal parts of my development time between OSX, Linux and Windows... they all have had pain points for me. The only difference is in OSX dev you're likely to have XCode & homebrew. In windows, you may have VS, and probably won't have Python ^2.7.0 installed. Part of why I've at least participated enough to raise a possible bit of help with the situation[1]. There are times when all you can reasonably do is raise the issue, and suggested fix... there are others where you should proactively fix it. Node/npm's community is very open-source driven, and very diverse. I don't liken it as much worse than any other platform, and far better than most. [1] https://github.com/nodejs/node/issues/3694 https://github.com/nodejs/node/issues/3694