I’ve got yet another clean install with problems building native modules (node-gyp). I’ve seen problems on Centos (try installing an Oracle Driver) with node-gyp, which doesn’t install properly - and it’s similar on Windows 10. Configuration is 10-x64, latest updates, Python 2.7 (whatever the latest 2.7x is), Visual Studio 2017 Community with its latest updates.
I’m not going into the details - I see dozens of postings all over the place with the exact same error messages and many ways to solve it none of which work - for me or the person posting (but it worked for someone else). I’ve never seen failures in what should be simple software installations like I’ve seen with Nodejs native modules (PKI infrastructure aside, but that is to be expected). It should have been fixed 5 years ago by the node teams, but they never bothered to come up with a good solution, and when something fails, it always leaves a mess behind that can take some serious system admin sleuthing to install. It is never a matter of just putting python in the path properly, no matter how many times that is suggested.
So this book is quickly into zmq which is a native module and, yes, once again, node-gyp suddenly doesn’t work and nothing fixes it and zmq can’t be installed and more than half of the book is worthless.
I also have zero interest in anything that requires “–harmony” to run. So older node versions are out. The node folks say 7.9 is stable, maybe it isn’t. but 6 is too far behind. I’m running win 10 and Visual Studio 2017 - which has phenominal support, much better than the 3 or probably 4 IDEs I tried on Linux (the only 2 I remember are Komodo and VS Code). That was a while back and I’m not a fan of the “beat head against wall” that Linux requires, either. The order of magnitude better support in VS 2017 Community for Node/MEAN work leaves it a non-option to switch to Linux.
So the problem is really “how to use the book” for the 2/3 that requires native modules? I don’t have a simple answer. Yes, I’ve tried all manner of removal and re-try, built-in package manager or native command line (admin level launch) - it’s all the same, down to the character, but that’s what I’d expect since it’s all just piped anyway.
The microsoft docs for setting up a node environment, https://github.com/Microsoft/nodejs-guidelines/blob/master/windows-environment.md#compiling-native-addon-modules is not helpful either and is a generation too old (VS 2015).
MY WISH: Never -EVER- put anything in a book that requires node-gyp (native modules). It is too problematic and fundamental issues. And don’t do the tired practice common to most books of bringing in 3rd party libraries which only complicate sorting out what is node and what is something else. I’ve seen that so much in the java world over the years. Someone writes a book for an open source thing and immediately starts in with “I’m so smart I always use these 10 other libraries so I’m including them in the examples” - which leaves the reader confused about what is 3rd party and what is the subject of the book. While this book isn’t that bad, it isn’t good either.
All I want is to follow some of the topics - and I don’t need all of the network plumbing, I simply want to add to my basic MEAN work from the past to more thoroughly take advantage of node’s capabilities.
It looks like I’ll be going to some other sources for a good walk through of features in MEAN I haven’t used yet. I put in my one-star rating on Amazon.