Install nodejs on CentOS

I’m using a Centos 7.1 on Azure. Node.js is not there in default repo for CentOS via yum. But you can get it using EPEL. After you install EPEL you can get nodejs.

cd /usr/src/
sudo yum install epel-release
sudo yum install nodejs
sudo yum install npm

And don’t forget npm!


Advertisements

(Failed attempt to) Set up Flow (Static typechecker for JS) on Windows 8.1

Flow is not officially supported on Windows. So I’m trying to set it up on my machine.

Flow uses OCaml; it is easy to get OCaml on Windows with Cygwin. Even the Cygwin setup has option to select OCaml.

First git clone flow from their source: https://github.com/facebook/flow using

git clone https://github.com/facebook/flow.git

Failed with error: ‘i686-w64-mingw32-gcc’ is not recognized as an internal or external command,
operable program or batch file.

Let us try by installing it

apt-cyg install mingw64-i686-gcc-g++

Retried make and got error: fatal error: gelf.h: No such file or directory
#include

Try installing libelf

apt-cyg install libelf-devel

no luck yet.

apt-cyg install ELFIO

Yet after not getting any success, I tried installing the sources for lib-elf as well.
Not working.

Uninstall OCaml and try using Cygwin’s OCaml

make

looks better, but still getting err: can’t find sys/syscall.h
hack (part of hhvm/hphp) is system dependent. probably it’ll take more time getting it done.

Update: Right now there is an unanswered question on Quora about it; if you find a solution, please post.