=============
=== NPM Permissions : https://docs.npmjs.com/getting-started/fixing-npm-permissions ===
=============

1. (remove /public on DocumentRoot)
sudo nano /etc/apache2/sites-available/000-default.conf


2.
sudo service apahce2 restart


3.
mkdir ~/.npm-global
npm config set prefix '~/.npm-global' && export PATH=~/.npm-global/bin:$PATH && source ~/.profile


4.
mkdir ~/.npm-global/lib && mkdir ~/.npm-global/lib/node_modules && mkdir ~/.npm-global/bin && mkdir ~/.npm-global/share


5.
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}


6. (in /var/www/) Thanks windows..
sudo npm i --no-bin-links


7. Thanks windows..
sudo npm i -g cross-env webpack webpack-dev-server --save


8.
npm run dev


=============
=== KARMA ===
=============

1.
npm i -g karma-cli phantomjs-prebuilt --save


2.
export PHANTOMJS_BIN=/home/vagrant/.npm-global/lib/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs


3.
npm run test
