Setting up an old application yarn got stuck.

huangapple go评论138阅读模式
英文:

Setting up an old application yarn got stuck

问题

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 finishes 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 the.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 finishes:

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 problem is with some private packages in Bitbucket.

For example:

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

I'm still wondering 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 set up SSH keys as I'm able to clone, pull, or push, but I cannot install any package.

Really appreciate any help.

英文:

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

答案1

得分: 1

我解决了我的问题,URL 必须更改如下:

"common-utils": "ssh://git@bitbucket.---.com:7999/scm/plat/common-utils.git#1.0.4"

现在它可以正常工作。

英文:

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

"common-utils": "ssh://git@bitbucket.---.com:7999/scm/plat/common-utils.git#1.0.4"

And now it worked perfectly fine.

答案2

得分: 0

ssh://bitbucket.inficon.com/scm/plat/common-utils.git 是一个奇怪的URL,因为你应该有一个用户指定的 ssh://git@bit...

请检查您是否在 ~/.ssh/config 文件中有一个包含 Host bitbucket.inficon.com 条目。它应该添加 User git,就像这里所示。

英文:

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.

huangapple
  • 本文由 发表于 2023年3月4日 00:44:00
  • 转载请务必保留本文链接:https://go.coder-hub.com/75629742.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定