NPM is the package manager for the Node .Js platform. when we build the Node.js or YARN applications from the pacakge.json having the dependencies with version, by default the packages are download from the npm repositories. This post will walk you through how to use the packages with remote repository and Local file in package.json file
The below install command helps to get the node package from github into your node_nodules and automatically adds the dependency to your package.json
$ npm install --save USER_NAME/REPO#branch-name or commit-or-tag
If you would like to get the package.json from different location will use the format below,
{
"name": "EXAMPLE",
"dependencies": {
"nodejs": "file:../path/package"
}
}
"name": "EXAMPLE",
"dependencies": {
"nodejs": "file:../path/package"
}
}
Also, able to install the npm modules file from the GIT repository with the example format below,
N
$ npm install "git://github.com/thelinuxfaq/nodejs_package.git#branch-name" --save
Comments (0)