Skip to content
This repository

JavaScript Statistical Library

branch: master

Fix 'make doc' issue on systems with node & nodejs

On systems with node installed as both 'node' and 'nodejs', 'make'
will evaluate 'which node nodejs' to include both the path to 'node'
and the path to 'nodejs', ultimatley psasing 'nodejs' as the first
argument to 'node' and throwing an error.

In order to fix this, and make 'make doc' run on systems with node
aliased to both 'node' and 'nodejs', I just added a 'grep' to select
the first of 'node' and 'nodejs' if both are defined.

Tested on Ubuntu 13.10 with GNU Make 3.81, GNU bash 4.2.45(1)-release
and Node.js v0.10.26.

Signed-off-by: Trevor Norris <>
latest commit 2130d4c6d7
jamescgibson jamescgibson authored trevnorris committed
Octocat-spinner-32 build add npm dependencies. simplify Makefile. remove jshint checks. remove…
Octocat-spinner-32 doc Merge remote-tracking branch 'upstream/master' into cumsum
Octocat-spinner-32 src Remove so many spaces
Octocat-spinner-32 test Remove so many spaces
Octocat-spinner-32 .gitignore add npm dependencies. simplify Makefile. remove jshint checks. remove…
Octocat-spinner-32 AUTHORS Update AUTHORS
Octocat-spinner-32 MIT-LICENSE.txt Update copyright info
Octocat-spinner-32 Makefile Fix 'make doc' issue on systems with node & nodejs
Octocat-spinner-32 Correct typo in Readme/Running Tests
Octocat-spinner-32 package.json Add couple cli options to vows/npm test

jStat - JavaScript Statistical Library

Build Prerequisites

In order to build jStat, you need to have GNU make 3.8 or later, Node.js 0.2 or later, and git 1.7 or later. (Earlier versions might work OK, but are not tested.)

Windows users have two options:

  1. Install msysgit (Full installer for official Git), GNU make for Windows, and a binary version of Node.js. Make sure all three packages are installed to the same location (by default, this is C:\Program Files\Git).
  2. Install Cygwin (make sure you install the git, make, and which packages), then either follow the Node.js build instructions or install the binary version of Node.js.

Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from Apple's Xcode site) and Once Homebrew is installed, run brew install git to install git, and brew install node to install Node.js.

Linux/BSD users should use their appropriate package managers to install make, git, and node, or build from source if you swing that way.

Building jStat

First, clone a copy of the jStat git repo by running git clone git://

To download all necessary libraries run npm install.

Then, to get a complete, minified version of jStat and all documentation, simply cd to the jstat directory and type make. If you don't have Node installed and/or want to make a basic, uncompressed, unlinted version of jstat, use make jstat instead of make.

The built version of jStat will be put in the dist/ subdirectory.

Generate just the documentation by running make doc. Documentation will be placed in dist/docs by default.

To remove all built files, run make clean.

Running Tests

Execute all tests by running make test.

Or if you wish to run a specific test, cd to test/<subdir> and run node <some_test>-test.js.

Join the Community

We always like discussion of how to improve jStat. Join us at our mailing list and let us know what you'd like to see. Also come ask questions in the #jstat channel on

Something went wrong with that request. Please try again.