I would like to install a package from npm ng2-table
, but with a pull request that is not merged to master.
There is anyway to add this pull request on my package.json
to install this commit instead master master on my application?
Asked
Active
Viewed 3,132 times
5

jhpratt
- 6,841
- 16
- 40
- 50

Felipe Avelar
- 177
- 3
- 14
-
Possible duplicate of [npm install from github pull request](https://stackoverflow.com/questions/33181297/npm-install-from-github-pull-request) – Cortney Thomas Apr 01 '19 at 15:22
1 Answers
6
You can specify the GitHub URL to the branch or commit that the PR was made from. You should specify the commit hash instead of the branch so that you don't unexpectedly get other (potentially-malicious) changes published to that branch in the future.
For example:
"package": user/repo#commit

SLaks
- 868,454
- 176
- 1,908
- 1,964
-
-
1@FelipeAvelar Yes. Usually just the first 6 characters are sufficient. Fur for completeness, it will be `"package": valor-software/ng2-table#785f7b4ecd1833a92bc6c94024df3f14e2b0eb6a` – msanford Nov 09 '17 at 19:30
-
I tried this and received this error: `npm ERR! fatal: reference is not a tree: 785f7b4ecd1833a92bc6c94024df3f14e2b0eb6a` – Felipe Avelar Nov 09 '17 at 19:52