MapD Charting Windows 10 Install Adventures and Tips

Jesse’s Big Data Adventures
6 min readAug 1, 2017

--

Although I installed mapd-charting with no problems on my Windows 10 64 bit workstation in my office, I recently spoke to a web developer who ran into some problems on his Win 10 laptop. To try and replicate his install problems, I installed MapD Charting on my family computer in my living room (Win 10 64 bit on X99 architecture).

It took a bit of time after breakfast, but after a cup of coffee, I successfully installed all the components by mid-morning and eliminated all the errors and warnings. I’m now playing with all the great charting examples, a satisfying experience.

Summary for Successful Install

  • install Python 2.7.x 64 bit. reboot computer to make sure PATH is set
  • read through error messages and use npm to install or update node packages manually
  • manually install node-gyp globally (npm install -g node-gyp)
  • install node-sass manually (npm install node-sass)
  • use git bash for npm run start

Work Log of What One Man (me) Did

Background

Walked up to family computer with a cup of coffee. Ran npm install, then traced errors. Computer is called “Rainbow Unicorn” and is not normally used for development.

family computer Rainbow Unicorn with case mod by Caitlyn
$ npm install
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN prefer global node-gyp@3.6.2 should be installed with -g

Installed components to get rid of warnings

to-iso-string

$ npm install @segment/to-iso-string
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
+ — @segment/to-iso-string@1.0.1

pug

$ npm install pug@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
+ — UNMET PEER DEPENDENCY mapbox-gl@https://github.com/mapd/mapbox-gl-js/tarball/9c04de6949fe498c8c79f5c0627dfd6d6321f307
` — pug@2.0.0-rc.2
+ — pug-code-gen@1.1.1

minimatch

$ npm update minimatch

node-gyp

$ npm install -g node-gypC:\Users\craig\AppData\Roaming\npm\node-gyp -> C:\Users\craig\AppData\Roaming\npm\node_modules\node-gyp\bin\node-gyp.jsC:\Users\craig\AppData\Roaming\npm` — node-gyp@3.6.2

Run npm install again

Can’t find Python

npm install fails when it can’t find Python

Installed Python 3.6.2 (don’t do this)

This was an error. Install Python 2.7.x instead. Skip this section.

Disabled Windows path length limit

Requires Python 2.x

D:\Development\mapd\mapd-charting\node_modules\contextify>if not defined npm_config_node_gyp (node “C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js” rebuild ) else (node “” rebuild )
gyp ERR! configure error
gyp ERR! stack Error: Python executable “C:\Users\craig\AppData\Local\Programs\Python\Python36\python.EXE” is v3.6.2, which is not supported by gyp.
gyp ERR! stack You can pass the — python switch to point to Python >= v2.5.0 & < 3.0.0.
gyp ERR! stack at failPythonVersion (C:\Program Files (x86)\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:454:14)

Install Python 2.x

I decided to install Python 2.x and uninstall Python 3.x to keep things simple. I don’t normally use Python on this computer.

Rebooting

Tried npm install again

fails, but the fix looks simple with

npm install mapbox-gl@https://github.com/mapd/mapbox-gl-js/tarball/9c04de6949fe498c8c79f5c0627dfd6d6321f307

install succeeds, but there are some warnings. Might as well fix them

point-geometry

D:\Development\mapd\mapd-charting>npm install @mapbox/point-geometry
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/point-geometry@0.1.0

mapbox-gl-style-spec

D:\Development\mapd\mapd-charting>npm install @mapbox/mapbox-gl-style-spec
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/mapbox-gl-style-spec@9.0.0
+ — lodash.isequal@3.0.4
` — rw@1.3.3

vector-tile

D:\Development\mapd\mapd-charting>npm install @mapbox/vector-tile
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/vector-tile@1.3.0

unitbezier

D:\Development\mapd\mapd-charting>npm install @mapbox/unitbezier
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/unitbezier@0.0.0

shelf-pack

\D:\Development\mapd\mapd-charting>npm install @mapbox/shelf-pack
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/shelf-pack@3.0.0

whoots-js

D:\Development\mapd\mapd-charting>npm install @mapbox/whoots-js
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/whoots-js@3.0.0

geojson-area

D:\Development\mapd\mapd-charting>npm install @mapbox/geojson-area
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — @mapbox/geojson-area@0.2.2

jsonlint-lines-primitives

npm WARN prefer global jsonlint-lines-primitives@1.6.0 should be installed with -g

D:\Development\mapd\mapd-charting>npm install -g jsonlint-lines-primitives
C:\Users\craig\AppData\Roaming\npm\jsonlint -> C:\Users\craig\AppData\Roaming\npm\node_modules\jsonlint-lines-primitives\lib\cli.js
C:\Users\craig\AppData\Roaming\npm
` — jsonlint-lines-primitives@1.6.0
+ — JSV@4.0.2
` — nomnom@1.8.1
+ — chalk@0.4.0
| + — ansi-styles@1.0.0
| + — has-color@0.1.7
| ` — strip-ansi@0.1.1
` — underscore@1.6.0

Trying npm install again

clean

Trying npm run start

fails, expects bash. You can tell why it fails because the script is running

rm -rf build.log example/js/* 

As there is no rm on DOS, I tried running npm run start on git bash.

npm ERR!
npm ERR! Failed at the @mapd/mapdc@1.0.0 clean:example script ‘rm -rf build.log example/js/*’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the @mapd/mapdc package,

Trying With git bash shell

Note the error about node-sass.

ERROR in ENOENT: no such file or directory, scandir ‘D:\Development\mapd\mapd-charting\node_modules\node-sass\vendor’@ ./scss/chart.scss 4:14–112

Install node-sass

D:\Development\mapd\mapd-charting>npm install node-sass> node-sass@3.13.1 install D:\Development\mapd\mapd-charting\node_modules\node-sass
> node scripts/install.js
Downloading binary from https://github.com/sass/node-sass/releases/download/v3.13.1/win32-x64-48_binding.node
Download complete ] — :
Binary saved to D:\Development\mapd\mapd-charting\node_modules\node-sass\vendor\win32-x64–48\binding.node
Caching binary to C:\Users\craig\AppData\Roaming\npm-cache\node-sass\3.13.1\win32-x64–48_binding.node
> node-sass@3.13.1 postinstall D:\Development\mapd\mapd-charting\node_modules\node-sass
> node scripts/build.js
Binary found at D:\Development\mapd\mapd-charting\node_modules\node-sass\vendor\win32-x64–48\binding.node
Testing binary
Binary is fine
@mapd/mapdc@1.0.0 D:\Development\mapd\mapd-charting
` — node-sass@3.13.1

Success

Another successful install on Windows 10 64 bit

Summary

I’ve installed MapD Charting on two Windows 10 computers and the experience was fine in both cases. I had to work through a few missing or outdated components, but I got to the point of playing with the cool graphs with no major hiccups. All the information needed is on the screen from npm.

I’m hoping to update the Windows 10 install documentation to give some pointers to dependencies like the Windows 8.1 SDK and Python 2.7.x.

If you have any problems with MapD Charting installation or would like to contribute to the knowledge pool, please join the

MapD Charting Community Discussion

--

--

Jesse’s Big Data Adventures

Exploring the potential of blockchain and big data. Trying out blockchain technologies, big data infrastructure, visualization, and storage technology.