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

[Bug?]: YN0082: │ @microsoft/kiota-abstractions@npm:*: No candidates found #6469

Open
1 task
1oglop1 opened this issue Aug 23, 2024 · 7 comments
Open
1 task
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@1oglop1
Copy link

1oglop1 commented Aug 23, 2024

Self-service

  • I'd be willing to implement a fix

Describe the bug

I am unable to install "@microsoft/msgraph-sdk": "1.0.0-preview.27" with yarn, I have no problem installing the package with npm or pnpm.
Package clearly exists here https://www.npmjs.com/package/@microsoft/kiota-abstractions

To reproduce

yarn add @microsoft/[email protected]

Environment

System:
    OS: macOS 14.5
    CPU: (10) arm64 Apple M1 Pro
  Binaries:
    Node: 20.8.0 - /private/var/folders/79/bvt24ns10_n58z24g_klmhmm0000gn/T/xfs-e8c196ba/node
    Yarn: 4.4.0 - /private/var/folders/79/bvt24ns10_n58z24g_klmhmm0000gn/T/xfs-e8c196ba/yarn
    npm: 10.1.0 - ~/.asdf/plugins/nodejs/shims/npm

Additional context

I tried yarn versions 3.6.4, 3.8.4, 4.4.0.
Deleted the metadata yarn cache clean --all && rm -rf $(yarn config get globalFolder)/metadata as per #5989

@baywet
Copy link

baywet commented Sep 12, 2024

Hi from the kiota team here 👋

 yarn add @microsoft/kiota-bundle
➤ YN0000: · Yarn 4.4.1
➤ YN0000: ┌ Resolution step
➤ YN0082: │ @microsoft/kiota-abstractions@npm:*: No candidates found
➤ YN0000: └ Completed in 0s 253ms
➤ YN0000: · Failed with errors in 0s 269ms

I've also tried clearing the cache and whatnot.

Is it possible the yarn registry is not indexing new packages properly/lagging? (I have not used yarn in a while, not sure whether there's some kind of proxy/registry that facades npm like go does)

@clemyan
Copy link
Member

clemyan commented Sep 13, 2024

All versions of @microsoft/kiota-abstractions on the npm registry are prerelease versions, which normally doesn't satisfy *.

Looks like pnpm just treat * as a synonym of latest

https://github.com/pnpm/pnpm/blob/eeb76cd1d0a3133d71d96de5646e305f34474652/resolving/npm-resolver/src/pickPackageFromMeta.ts#L148-L152

Maybe we can do that, or use latest as a fallback?
@arcanis What do you think?

@clemyan clemyan added the good first issue Good for newcomers label Sep 13, 2024
@arcanis
Copy link
Member

arcanis commented Sep 13, 2024

Maybe we can do that, or use latest as a fallback?

I think it'd make sense to tolerate the prerelease versions until at least one stable is released. We can't make * tolerate all prerelease everytime though, it wouldn't match semver (and would break backward compatibility).

@clemyan
Copy link
Member

clemyan commented Sep 13, 2024

I think it'd make sense to tolerate the prerelease versions until at least one stable is released. We can't make * tolerate all prerelease everytime though, it wouldn't match semver (and would break backward compatibility).

To be clear, you are saying if the range is * and no version satisfies it, we should simply retry with includePrerelease instead of using latest?

@arcanis
Copy link
Member

arcanis commented Sep 13, 2024

That's what I'm thinking, yes

@zZHorizonZz
Copy link

Is there any workaround for this? I'm also having an issue with @microsoft/kiota-bundle.

@clemyan
Copy link
Member

clemyan commented Oct 2, 2024

@zZHorizonZz You can use resolutions to bypass the default resolution algorithm, e.g.:

"resolutions": {
  "@microsoft/kiota-abstractions": "npm:latest"
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants