Skip to content

Instantly share code, notes, and snippets.

@luisfc
Last active October 3, 2020 16:37
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save luisfc/ca843dd5c6b244dde496168d99b4282a to your computer and use it in GitHub Desktop.
Save luisfc/ca843dd5c6b244dde496168d99b4282a to your computer and use it in GitHub Desktop.
Install nodejs, npm and gulp ubuntu 16.04
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
## Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/nodejs
(NOTICE that the default installation for nodejs is in the /usr/bin/nodejs and not /usr/bin/node)
To upgrade to latest version (and not current stable) version, you can use
sudo n latest
##To undo:
sudo apt-get install --reinstall nodejs-legacy # fix /usr/bin/node
sudo n rm 6.0.0 # replace number with version of Node that was installed
sudo npm uninstall -g n
## or
#update npm
npm install npm@latest -g
------------------
Gulp Installation
For global use with slush
Install gulp-install as a dependency:
npm install --save gulp-install
For local use with gulp
Install gulp-install as a development dependency:
npm install --save-dev gulp-install
----------
##detect gulp command into drupal
npm install gulp-cli -g
https://www.drupal.org/docs/8/theming/creating-automation-tools-for-custom-themes-gulpjs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment