This is what I had to do in order to get code completion for node.js to work with kdevelop on Ubuntu 14.04.
I have not run through these steps again on a fresh system so, I'm not sure if I'm missing anything here. If you find something missing please let me know.
#enable the backports repository to get kdevelop 4.7
sudo apt-add-repository ppa:kubuntu-ppa/backports
sudo apt-get update
#you may be able to skip this step if you want, but I did it.
sudo apt-get upgrade
#install required packages. I may have already had others installed, this is just what additional I had to add
sudo apt-get install build-essential kdevelop kdevelop-dev libqjson-dev
mkdir ~/projects
cd ~/projects
#this step may not be necessary as I was initially trying to build the kdev-qmljs master branch which is based on QT5?
git clone git://anongit.kde.org/extra-cmake-modules
cd extra-cmake-modules
mkdir build
cd build
cmake ../
make
sudo make install
cd ~/projects
#get the kdev-qmljs code
git clone git://anongit.kde.org/kdev-qmljs
git checkout remotes/origin/1.7
git checkout -b 1.7
cd kdev-qmljs
mkdir build
cd build
cmake -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix) -DCMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install