gobblejs / gobble

The last build tool you'll ever need
333 stars 20 forks source link

Patchwatcher uses node-gyp which requires a few extra things on Windows #108

Closed fskreuz closed 8 years ago

fskreuz commented 8 years ago

Not sure where to leave this (probably in the wiki) but here goes. pathwatcher uses node-gyp. node-gyp can be a pain to set up on Windows. So for Windows users, follow the instructions in this comment for instructions on how to get node-gyp running without exploding spectacularly.

TL;DR:

  1. Install Visual C++ Build Tools 2015 Technical Preview
    • Select both Windows 8.1 and Windows 10 SDKs.
  2. Install Python 2.7
    • Add it to your PATH (The installer usuallt does it for you. Just reopen your terminal.)
  3. Open a terminal
    • Do npm config set python python2.7
    • Do npm config set msvs_version 2015 --global
Rich-Harris commented 8 years ago

Oh lordy. That sounds like a nightmare. Are there any filewatching packages that don't suck on Windows (but also not on OS X/Linux)? Seems like there's a bajillion of these things and they all have quirks

fskreuz commented 8 years ago

I'm not aware of other options.

On the other hand, is polling an option? I remember Compass having a --poll when all else fails. Not as efficient, but can be better than a headache. Works great when listening files on a mounted network drive.

MartinKolarik commented 8 years ago

It's not that bad. IIRC I only needed to install python and Visual Studio (which many windows devs use anyway) and didn't have to configure anything at all. Also, node-gyp is used by many packages, and you only have to do this once.

fskreuz commented 8 years ago

Agreed. The procedure above isn't really that bad. It's just installing platform-specific tools and Python.

What's bad is node-gyp's documentation up front which tells you to install a bajillion other things you don't actually need and tweak a few values which you don't actually have to. Tried this morning, it installed that bloated IDE, IIS, SQL, .NET and potentially many more when all I needed was for node-gyp to compile some module.

Should anyone come across issues on Windows after upgrading gobble, hopefully this solves their problems without having to read that very long thread and having to install VS which they don't really need.

IvanSanchez commented 8 years ago

On the other hand, is polling an option?

I know chokidar (see https://github.com/gobblejs/gobble/pull/106) can do polling and accept options, but I'm not aware of anything like that in pathwatcher :-(

Rich-Harris commented 8 years ago

Have moved this into the wiki – https://github.com/gobblejs/gobble/wiki/Troubleshooting – so I'll close this as I don't think there's anything else to be done here