Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install error #5327

Closed
radoslawKnitter opened this issue Jul 6, 2023 · 10 comments
Closed

install error #5327

radoslawKnitter opened this issue Jul 6, 2023 · 10 comments

Comments

@radoslawKnitter
Copy link

when installing by:

  • A-Frame Version: 1.4.2
  • Platform / Device: Linux
  • Reproducible Code Snippet or URL:
    npm install aframe
npm ERR! code 128
npm ERR! Command failed: /usr/bin/git checkout 21d017046216e318362c48abd1a48bddfb6e0733
npm ERR! fatal: reference is not a tree: 21d017046216e318362c48abd1a48bddfb6e0733
npm ERR! 

npm ERR! A complete log of this run can be found in:

or
yarn add aframe --verbose

yarn add v1.22.19
verbose 0.459107352 Checking for configuration file "/www/shapi/.npmrc".
verbose 0.459702919 Checking for configuration file "/home/hammer/.npmrc".
verbose 0.460096721 Checking for configuration file "/usr/etc/npmrc".
verbose 0.460751362 Checking for configuration file "/www/shapi/.npmrc".
verbose 0.46116437 Checking for configuration file "/www/.npmrc".
verbose 0.462701677 Checking for configuration file "/www/shapi/.yarnrc".
verbose 0.463037612 Checking for configuration file "/home/hammer/.yarnrc".
verbose 0.463579561 Found configuration file "/home/hammer/.yarnrc".
verbose 0.464264611 Checking for configuration file "/usr/etc/yarnrc".
verbose 0.464840531 Checking for configuration file "/www/shapi/.yarnrc".
verbose 0.465146782 Checking for configuration file "/www/.yarnrc".
verbose 0.473261011 current time: 2023-07-06T08:28:35.869Z
[1/4] Resolving packages...
verbose 1.134633066 Performing "GET" request to "https://registry.yarnpkg.com/aframe".
verbose 1.279306173 Request "https://registry.yarnpkg.com/aframe" finished with status code 200.
verbose 1.286852875 Performing "GET" request to "https://registry.yarnpkg.com/buffer".
verbose 1.288455019 Performing "GET" request to "https://registry.yarnpkg.com/custom-event-polyfill".
verbose 1.290854531 Performing "HEAD" request to "https://github.com/ngokevin/debug".
verbose 1.292198768 Performing "GET" request to "https://registry.yarnpkg.com/deep-assign".
verbose 1.293736337 Performing "GET" request to "https://registry.yarnpkg.com/@ungap%2fcustom-elements".
verbose 1.295640239 Performing "GET" request to "https://registry.yarnpkg.com/load-bmfont".
verbose 1.296889827 Performing "GET" request to "https://registry.yarnpkg.com/present".
verbose 1.298270033 Performing "GET" request to "https://registry.yarnpkg.com/promise-polyfill".
verbose 1.359492885 Request "https://registry.yarnpkg.com/buffer" finished with status code 200.
verbose 1.360128715 Performing "GET" request to "https://registry.yarnpkg.com/super-animejs".
verbose 1.378108585 Request "https://registry.yarnpkg.com/custom-event-polyfill" finished with status code 200.
verbose 1.378637186 Performing "GET" request to "https://registry.yarnpkg.com/super-three".
verbose 1.392149167 Request "https://registry.yarnpkg.com/load-bmfont" finished with status code 200.
verbose 1.392708496 Performing "HEAD" request to "https://github.com/dmarcos/three-bmfont-text".
verbose 1.403449395 Request "https://registry.yarnpkg.com/deep-assign" finished with status code 200.
verbose 1.403974921 Performing "GET" request to "https://registry.yarnpkg.com/webvr-polyfill".
verbose 1.409050623 Request "https://registry.yarnpkg.com/super-animejs" finished with status code 200.
verbose 1.40969244 Performing "GET" request to "https://registry.yarnpkg.com/base64-js".
verbose 1.412863922 Request "https://registry.yarnpkg.com/promise-polyfill" finished with status code 200.
verbose 1.413283828 Performing "GET" request to "https://registry.yarnpkg.com/ieee754".
verbose 1.445982379 Request "https://registry.yarnpkg.com/super-three" finished with status code 200.
verbose 1.446409338 Performing "GET" request to "https://registry.yarnpkg.com/buffer-equal".
verbose 1.451482702 Request "https://registry.yarnpkg.com/base64-js" finished with status code 200.
verbose 1.451856624 Performing "GET" request to "https://registry.yarnpkg.com/mime".
verbose 1.454969808 Request "https://registry.yarnpkg.com/webvr-polyfill" finished with status code 200.
verbose 1.455364404 Performing "GET" request to "https://registry.yarnpkg.com/parse-bmfont-ascii".
verbose 1.460893944 Request "https://registry.yarnpkg.com/ieee754" finished with status code 200.
verbose 1.461503559 Performing "GET" request to "https://registry.yarnpkg.com/parse-bmfont-binary".
verbose 1.493919045 Request "https://registry.yarnpkg.com/parse-bmfont-ascii" finished with status code 200.
verbose 1.494899046 Performing "GET" request to "https://registry.yarnpkg.com/parse-bmfont-xml".
verbose 1.498075082 Request "https://registry.yarnpkg.com/mime" finished with status code 200.
verbose 1.498576961 Performing "GET" request to "https://registry.yarnpkg.com/phin".
verbose 1.501015502 Request "https://registry.yarnpkg.com/parse-bmfont-binary" finished with status code 200.
verbose 1.501372567 Performing "GET" request to "https://registry.yarnpkg.com/xhr".
verbose 1.531642775 Request "https://registry.yarnpkg.com/parse-bmfont-xml" finished with status code 200.
verbose 1.531997382 Performing "GET" request to "https://registry.yarnpkg.com/is-obj".
verbose 1.539886096 Request "https://github.com/dmarcos/three-bmfont-text" finished with status code 200.
verbose 1.54022856 Performing "GET" request to "https://registry.yarnpkg.com/cardboard-vr-display".
verbose 1.547038757 Request "https://registry.yarnpkg.com/phin" finished with status code 200.
verbose 1.547382253 Performing "GET" request to "https://registry.yarnpkg.com/xml-parse-from-string".
verbose 1.549782456 Request "https://registry.yarnpkg.com/xhr" finished with status code 200.
verbose 1.550116859 Performing "GET" request to "https://registry.yarnpkg.com/xml2js".
verbose 1.57219839 Request "https://registry.yarnpkg.com/is-obj" finished with status code 200.
verbose 1.573118803 Performing "GET" request to "https://github.com/dmarcos/three-bmfont-text.git/info/refs?service=git-upload-pack".
verbose 1.580501696 Request "https://registry.yarnpkg.com/cardboard-vr-display" finished with status code 200.
verbose 1.582181734 Performing "GET" request to "https://registry.yarnpkg.com/gl-preserve-state".
verbose 1.584593644 Request "https://registry.yarnpkg.com/xml-parse-from-string" finished with status code 200.
verbose 1.584974856 Performing "GET" request to "https://registry.yarnpkg.com/nosleep.js".
verbose 1.589474457 Request "https://registry.yarnpkg.com/xml2js" finished with status code 200.
verbose 1.589849885 Performing "GET" request to "https://registry.yarnpkg.com/webvr-polyfill-dpdb".
verbose 1.616620138 Request "https://registry.yarnpkg.com/gl-preserve-state" finished with status code 200.
verbose 1.617007056 Performing "GET" request to "https://registry.yarnpkg.com/sax".
verbose 1.620958575 Request "https://registry.yarnpkg.com/nosleep.js" finished with status code 200.
verbose 1.621326181 Performing "GET" request to "https://registry.yarnpkg.com/xmlbuilder".
verbose 1.629384491 Request "https://registry.yarnpkg.com/webvr-polyfill-dpdb" finished with status code 200.
verbose 1.659710666 Request "https://registry.yarnpkg.com/sax" finished with status code 200.
verbose 1.664884459 Request "https://registry.yarnpkg.com/xmlbuilder" finished with status code 200.
verbose 1.849296856 Request "https://github.com/dmarcos/three-bmfont-text.git/info/refs?service=git-upload-pack" finished with status code 200.
verbose 1.912187786 Request "https://github.com/ngokevin/debug" finished with status code 200.
verbose 1.913098159 Performing "GET" request to "https://github.com/ngokevin/debug.git/info/refs?service=git-upload-pack".
verbose 2.08216915 Request "https://github.com/ngokevin/debug.git/info/refs?service=git-upload-pack" finished with status code 200.
verbose 2.08421532 Performing "GET" request to "https://raw.githubusercontent.com/ngokevin/debug/ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a/package.json".
verbose 2.12962817 Request "https://registry.yarnpkg.com/present" finished with status code 200.
verbose 2.227491046 Request "https://raw.githubusercontent.com/ngokevin/debug/ef5f8e66d49ce8bc64c6f282c15f8b7164409e3a/package.json" finished with status code 200.
verbose 2.260533377 Request "https://registry.yarnpkg.com/buffer-equal" finished with status code 200.
verbose 2.340558721 Request "https://registry.yarnpkg.com/@ungap%2fcustom-elements" finished with status code 200.
verbose 2.911756885 Error: Couldn't find match for "21d017046216e318362c48abd1a48bddfb6e0733" in "refs/heads/gh-pages,refs/heads/master,refs/pull/1/head,refs/pull/1/merge,refs/pull/2/head,refs/tags/v1.0.1,refs/tags/v1.0.2,refs/tags/v1.0.3,refs/tags/v1.0.4,refs/tags/v1.0.5,refs/tags/v1.0.6,refs/tags/v1.0.7,refs/tags/v1.1.0,refs/tags/v1.1.1,refs/tags/v1.2.0,refs/tags/v2.0.0,refs/tags/v2.0.1,refs/tags/v2.1.0,refs/tags/v2.2.0,refs/tags/v2.2.1,refs/tags/v2.3.0" for "https://github.com/dmarcos/three-bmfont-text.git".
    at MessageError.ExtendableBuiltin (/home/hammer/.yarn/lib/cli.js:721:66)
    at new MessageError (/home/hammer/.yarn/lib/cli.js:750:123)
    at Git.<anonymous> (/home/hammer/.yarn/lib/cli.js:51246:15)
    at Generator.next (<anonymous>)
    at step (/home/hammer/.yarn/lib/cli.js:310:30)
    at /home/hammer/.yarn/lib/cli.js:321:13
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
error Couldn't find match for "21d017046216e318362c48abd1a48bddfb6e0733" in "refs/heads/gh-pages,refs/heads/master,refs/pull/1/head,refs/pull/1/merge,refs/pull/2/head,refs/tags/v1.0.1,refs/tags/v1.0.2,refs/tags/v1.0.3,refs/tags/v1.0.4,refs/tags/v1.0.5,refs/tags/v1.0.6,refs/tags/v1.0.7,refs/tags/v1.1.0,refs/tags/v1.1.1,refs/tags/v1.2.0,refs/tags/v2.0.0,refs/tags/v2.0.1,refs/tags/v2.1.0,refs/tags/v2.2.0,refs/tags/v2.2.1,refs/tags/v2.3.0" for "https://github.com/dmarcos/three-bmfont-text.git".
@mrxz
Copy link
Contributor

mrxz commented Jul 6, 2023

There were some changes recently to the three-bmfont-text fork resulting in the referenced commit not being part of any branch/tag. But it all still seems to work fine for me with npm (9.6.7) and yarn (3.6.0). I can reproduce the issue when using yarn 1.22.19, so it seems that older versions don't support referencing orphaned commits.

If it's an option for you, could you try with a more recent version of either of those tools?

@dmarcos Could you push a tag for 21d017046216e318362c48abd1a48bddfb6e0733 to dmarcos/three-bmfont-text. I believe that should resolve the issue for anyone as well.

@radoslawKnitter
Copy link
Author

error on npm 8.18.0
on 9.8.0

npm WARN skipping integrity check for git dependency ssh://[email protected]/dmarcos/three-buffer-vertex-data.git 
npm WARN skipping integrity check for git dependency ssh://[email protected]/dmarcos/three-bmfont-text.git 

but yarn doesn't work

@mrxz
Copy link
Contributor

mrxz commented Jul 6, 2023

Those warnings are to be expected as npm can't check integrity of git dependencies. It should have installed aframe and transitive dependencies at that point.

but yarn doesn't work

In what way 'doesn't it work'? Any error or warning message? Which version of yarn did you try?

@menno
Copy link

menno commented Jul 6, 2023

I can confirm the issue with yarn v1.x. Upgrading to newer yarn is quite a hassle. And it may not solve it as you said it appears to be a Git issue:

git clone https://github.com/dmarcos/three-bmfont-text.git
Cloning into 'three-bmfont-text'...
remote: Enumerating objects: 354, done.
remote: Counting objects: 100% (138/138), done.
remote: Compressing objects: 100% (29/29), done.
remote: Total 354 (delta 118), reused 113 (delta 109), pack-reused 216
Receiving objects: 100% (354/354), 723.28 KiB | 1.71 MiB/s, done.
Resolving deltas: 100% (202/202), done.
cd three-bmfont-text
git checkout 21d017046216e318362c48abd1a48bddfb6e0733
fatal: reference is not a tree: 21d017046216e318362c48abd1a48bddfb6e0733

My assumption is that a regular clone does not retrieve orphaned commits.

Github points out the commit was orphaned: dmarcos/three-bmfont-text@21d0170
and it looks like the commit was orphaned due to a recommit by @mrxz : dmarcos/three-bmfont-text@3172776
edit: the force push to master caused the orphaned commit: dmarcos/three-bmfont-text#2

Indeed pushing a tag for this commit would likely solve the issue.

Ideally this dependency would be updated to a normal published npm package instead being pulled from github.

@mrxz
Copy link
Contributor

mrxz commented Jul 6, 2023

Upgrading to a newer Yarn version shouldn't be such a hassle. It's the recommended thing to do when facing bugs or issues using v1.x and it just so happens that this isn't an issue on (at least) 3.6.0 🙂

It isn't really relevant what the default behaviour of a git clone is, as the package.json doesn't prescribe that. It just points to a specific commit in a repo which, as evident by the link you placed, can be resolved. Not sure since which version npm and yarn started resolving them, but it luckily means a workaround exists

That's not to say that it shouldn't be addressed. A tag of the commit is the quickest and cleanest solution IMHO. While I do agree that it would be nice to only depend on published npm packages (and preferably also not custom forks), that wouldn't address the issue at hand (as already published aframe versions still reference the commit).

@dmarcos
Copy link
Member

dmarcos commented Jul 6, 2023

Not sure what the problem is here. package.json points to dmarcos/three-bmfont-text@eed4878 which is the tip of master at the moment. dmarcos/three-bmfont-text@21d0170 should not be fetched.

@dmarcos
Copy link
Member

dmarcos commented Jul 6, 2023

Maybe need to delete node_modules or reset yarn cache? not familiar with how yarn works.

@menno
Copy link

menno commented Jul 6, 2023

The latest release of aframe 1.4.2 still has a package.json that points to the dmarcos/three-bmfont-text@21d0170

Yarn v1/classic does a git clone + git checkout to install the package, which does not work because it's orphaned.
Later versions of yarn or npm directly get a .tar.gz from github which does work for orphaned commits apparently.

So in order for people to install the release of aframe with yarn v1, you'd need to get the commit "unorphaned" by tagging it or make it a branch.

@dmarcos
Copy link
Member

dmarcos commented Jul 6, 2023

I see. strange yarn behavior since the commit is still in the repo even if no branch references it. just pushed a branch pointing to the commit.

@dmarcos
Copy link
Member

dmarcos commented Jul 6, 2023

closing this. can reopen if necessary.

@dmarcos dmarcos closed this as completed Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants