/ Polymer

Polymer-cli and Windows Bash

Recently, I've been playing around with the Windows Subsystem Linux (WSL). This means you can run a native bash terminal on Windows without installing VMWare, VirtualBox, Cygwin, etc. Bash on Windows is neat and I'll outline my development toolset in another post.

Earlier I was trying to install the new Polymer-CLI which is now the prescribed way to use Polymer.

The instructions for installing Polymer-CLI is pretty straight-forward using npm install -g polymer-cli.

However, as of this current date (Nov 10, 2016) the default NodeJS package available for Bash on Windows is an old NodeJS version. This is because bash is tied to Ubuntu 14.04 which is "locked" to an older repository.

The TLDR fix is the following:

  • curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  • sudo apt-get install -y nodejs

This requires that you install curl on bash (apt-get install curl).

Note there is a security implication of sending the downloaded contents into a command line. This means you assume you trust the content from deb.nodesource.com/setup_6.x

Once you update/install Node you will now be running at least v6.9.1

After this you can run the npm installation line.