Skip to main content

Posts

Showing posts with the label Node

Node : How to uninstall a nodejs global dependency

Uninstall global node dependency To uninstall a node dependency installed with -g command you can use the following command. npm uninstall -g <dependency> The above command will remove that dependency from your system. Uninstall node dependency To remove a dependency from your project you can use the following command. npm uninstall <dependency> This will remove the dependency and remove its entry from the package.json file.

Node : How to Upgrade NodeJs and Npm and How to install latest NodeJs on Linux, Ubuntu

Points to Remember If you are installing node for the first time then, use the NodeSource PPA and first choose the version of node you want to install. Following are the sources for the node versions for Node.js v4 curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - for Node.js v5 curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - for Node.js v6 curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - for Node.js v7 curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - Once this is done, then update your repositories by command sudo apt-get update Now, finally install NodeJs and Npm using the following command sudo apt-get install nodejs sudo apt-get install npm To check the version of node, try command node -v and npm version by command npm -v Upgrading NodeJs and Npm If you already have node and npm install and...

Browserify : How to use Node.js require dependencies in Browser as Javascipt

How to get Browserify Use the following to download browserify . npm install -g browserify Automate Browserify Dependency You can also create a package.json file by the following command. npm init This will create a basic package.json file. now run the command npm install --save browserify --save option will download the file and save its reference in package.json . Now on other machine you just need to run the command npm install and it will download the browserify plugin and save it on your machine. This will download the browserify in node_modules folder. Now we can use browserify to download our node dependencies. For this we will first create a .js file named require.js , you can name it anything you want. Let's see a sample file. angular = require ( 'angular' ); ngSanitize = require ( 'angular-sanitize' ); Now, to make browserify work you should have all these modules installed...