I'm trying to migrate a project from NPM to Yarn.
Part of my node dependencies are private packages hosted on Bitbucket (not published on NPM registry) under the namespace of the company I'm working for.
With NPM I'm able to declare those kind of dependencies with different syntaxes in my package.json
. Like this:
// package.json
"dependencies": {
...
@myCompany/package-name": "bitbucket:bitbucket-username/repo-name.git",
...
}
But when I run yarn install
I the following error:
ssh: Could not resolve hostname bitbucket: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
I'm running yarn v0.23.3
on a MAC OSX.
Is there any further syntax or workaround to let yarn install private repository from bitbucket?
I've scraped into Yarn's github issues, but I wasn't able to find any hint to decide whether keep on trying or give up.
Thank in advance!
Try
"@myCompany/package-name": "git+ssh://[email protected]/bitbucket-username/repo-name.git",
At least, that's what I'm using and it works without any problems.
I didn't succeeded to know if this issue with yarn was resolved yet. So instead here is a workaround : https://www.npmjs.com/package/yarn-git-install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With