skip to Main Content

I’m running an sh script and as part of it is using yarn to pull Angular,js packages:

rm -f yarn.lock
rm -rf node_modules
rm -rf web/statecharts
rm -rf release
rm -f fusion-*.deb
rm -f checksumFileList
make -C web clean
make[1]: Entering directory '/home/vagrant/fusion-build/-/web'
rm -rf build/*
rm -f new-front-panel.html
make[1]: Leaving directory '/home/vagrant/fusion-build/-/web'
mkdir -p node_modules
rm -rf node_modules
rm -rf ~/.yarn-cache/
mkdir -p ~/.yarn-cache
yarn cache clean
yarn cache v0.22.0
success Cleared cache.
Done in 0.04s.
yarn install --ignore-engines --verbose
yarn install v0.22.0
verbose 0.18 current time: 2023-03-03T16:28:35.677Z
info No lockfile found.
[1/4] Resolving packages...

It never finish resolving the packages:

verbose 6.596 Request "https://registry.yarnpkg.com/lodash.isfunction" finished with status code 200.
verbose 6.603 Request "https://registry.yarnpkg.com/lodash._basecreatewrapper" finished with status code 200.
verbose 6.604 Performing "GET" request to "https://registry.yarnpkg.com/lodash._basecreate".
verbose 6.607 Request "https://registry.yarnpkg.com/lodash._basebind" finished with status code 200.
verbose 6.623 Request "https://registry.yarnpkg.com/streamsearch" finished with status code 200.
verbose 6.665 Request "https://registry.yarnpkg.com/lodash._basecreate" finished with status code 200.
verbose 6.823 Request "https://registry.yarnpkg.com/number-is-nan" finished with status code 200.
verbose 6.899 Request "https://registry.yarnpkg.com/lodash._arraypool" finished with status code 200.
verbose 6.962 Request "https://registry.yarnpkg.com/lodash._maxpoolsize" finished with status code 200.
⢀ lodash._basecreate@~2.4.1

It remains there forever and never finish:

I’m running this in a Vagrant VM with Ubuntu 16.04:

vagrant@ubuntu-xenial:/app$ node –version
v6.11.0
vagrant@ubuntu-xenial:/app$ npm –version
3.5.2
vagrant@ubuntu-xenial:/app$ yarn –version
0.22.0

I really will appreciate any hint or help on how to solve this.


UPDATE

After removing all the entries in the package.json for every single dependency I found out that the the problem is with some private packages in Bitbucket.

For example:

"common-utils": "git+https://bitbucket.-.com/scm/plat/common-utils.git"

I’m still wonder why yarn cannot fetch those packages if I have access to clone the repo?

Error:

verbose 21.626 Error: Command failed. Exit code: 128 Command: git
Arguments: clone ssh://bitbucket.inficon.com/scm/plat/common-utils.git
/home/vagrant/.cache/yarn/v1/.tmp/d2c1201f228b0ed5612fcfec772f1f68
Directory: /home/vagrant/fusion-build/Micro-GC-Fusion Output: Cloning
into
‘/home/vagrant/.cache/yarn/v1/.tmp/d2c1201f228b0ed5612fcfec772f1f68’…
ssh: connect to host bitbucket.inficon.com port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository
exists.
at MessageError (/usr/local/lib/node_modules/yarn/lib/errors.js:8:5)
at SpawnError (/usr/local/lib/node_modules/yarn/lib/errors.js:18:1)
at ChildProcess.proc.on.code (/usr/local/lib/node_modules/yarn/lib/util/child.js:107:15)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:891:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) error Command failed. Exit code: 128
Command: git Arguments: clone
ssh://bitbucket.inficon.com/scm/plat/common-utils.git
/home/vagrant/.cache/yarn/v1/.tmp/d2c1201f228b0ed5612fcfec772f1f68
Directory: /home/vagrant/fusion-build/Micro-GC-Fusion Output: Cloning
into
‘/home/vagrant/.cache/yarn/v1/.tmp/d2c1201f228b0ed5612fcfec772f1f68’…
ssh: connect to host bitbucket.inficon.com port 22: Connection refused
fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository
exists. info Visit https://yarnpkg.com/en/docs/cli/install for
documentation about this command.

I think I have correctly setup ssh keys as I’m able to clone, pull or push, but I cannot install any package.

Really appreciate any help

2

Answers


  1. Chosen as BEST ANSWER

    I solved my issue, the url had to be changed like this:

    "common-utils": "ssh://[email protected]:7999/scm/plat/common-utils.git#1.0.4"

    And now it worked perfectly fine.


  2. ssh://bitbucket.inficon.com/scm/plat/common-utils.git is a strange URL since you should have a user specified ssh://git@bit...

    Check if you have a ~/.ssh/config with a Host bitbucket.inficon.com entry in it. It should add the User git, as in here.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search