I'm trying to install a repository by either a branch or specific commit hash. The npm docs seem to suggest that something like this should work:
for a specific branch:
"repo-name": "git+ssh://git@bitbucket.org:OrgName/projectname.git#<branchname>"
for a specific commit:
"repo-name": "git+ssh://git@bitbucket.org:OrgName/projectname.git#<commithash>"
But when I run "npm i --verbose" trying to install by commit hash, the install gets stuck with a 404 for the repo like this:
npm http fetch GET 404 https://bitbucket.org/OrgName/projectname/get/<commithash>.tar.gz
Does anyone know the correct way to install a branch or commit this way?
Thank you in advance!
Hello @Thomas Chestnut and welcome to the Community!
The example templates you provided use SSH connection, while the error message you shared seems to be using HTTP. I suspect there may be some misconfiguration in your package.json.
While I'm not very familiar with npm configuration itself, I found the following articles/threads with instructions on how to setup the npm dependencies to fetch from a bitbucket repository that may be of help :
You might want to try using the format specified on those pages and let us know how it goes.
Thank you, @Thomas Chestnut !
Patrik S
Hi @Patrik S , thanks for response! I'll check out those articles and see if that helps out.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Patrik S , those discussions helped! Tagging my commit and referencing the tag like this seems to fixed the issue.
"repo-name": "git+ssh://git@bitbucket.org:OrgName/projectname.git#<tag>"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.