CareBear CareBear

Niner since 2004


  • Node.js and npm for the Windows Developer

    @LukePuplett: Working on a large Angular app as well, and have used both grunt and gulp extensively before. I do have some experience with issues that have been caused by problems during download and unpacking of the npm packages, but they have all been fixed with a cache clean and retries. Many great improvements with npm 3 which is now included with NodeJS 4 and 5.

    So I don't think there is any point in telling others to be "treading very cautiously", that could scare most people away. Microsoft have added support for using npm in both Cordova Apps and in the upcoming ASP.NET 5 projects, as well as Bower (I don't advice anyone to use it, rely only on npm if possible).

    And if someone is reading this, you should not take the advice of checking the node_modules into your source control. Depending on what you are working on, you might be commiting tens of thousands of files with a total size of potentially hundreds of megabytes. We use npm for both gulp tasks and for app client libs, so it's a lot of files. Having those in the source repository would be detrimental to any project, and horrible during updates and upgrades for individual developers.

    While Node.JS did not start out on the Windows platform, it has matured a lot in the recent time and is getting widespread use for both client and server based solutions.

    One important tip: Always use specific version number in package.json, or else you might introduce bugs in production and test environments that you don't have on local machines.