graphql-code-generator icon indicating copy to clipboard operation
graphql-code-generator copied to clipboard

@graphql-codegen/visitor-plugin-common@npm:4.1.0: No candidates found

Open efstathiosntonas opened this issue 1 year ago • 2 comments
trafficstars

Which packages are impacted by your issue?

@graphql-codegen/visitor-plugin-common

Describe the bug

Cannot install using yarn@4 because @graphql-codegen/[email protected] is missing from registry.

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

  1. try to install packages of package.json listed below
  2. fails with: @graphql-codegen/visitor-plugin-common@npm:4.1.0: No candidates found
  3. npmjs.com still got the 4.0.1 version

Expected behavior

install the plugin

Screenshots or Videos

No response

Platform

  • OS: macOS
  • NodeJS: 18.17.1
  • graphql version: 16.3.0
  • @graphql-codegen/* version(s): 5.0.0

Codegen Config File

No response

Additional context

If I manually install it yarn add @graphql-codegen/visitor-plugin-common on top of the package.json below it installs just fine, it installs 4.0.1 since 4.1.0 is missing from npmjs.com registry.

package.json:

    "@graphql-codegen/add": "^5.0.0",
    "@graphql-codegen/cli": "^5.0.0",
    "@graphql-codegen/fragment-matcher": "^5.0.0",
    "@graphql-codegen/introspection": "^4.0.0",
    "@graphql-codegen/jsdoc": "^3.0.0",
    "@graphql-codegen/typescript": "^4.0.1",
    "@graphql-codegen/typescript-apollo-client-helpers": "^3.0.0",
    "@graphql-codegen/typescript-operations": "^4.0.1",
    "@graphql-codegen/typescript-react-apollo": "^4.1.0",

efstathiosntonas avatar Jan 09 '24 08:01 efstathiosntonas

It seems that by adding

npmRegistryServer: https://registry.npmjs.org

into .yarnrc.yml it fixes the issue. I guess that since 4.1.0 is not marked as latest on npmjs registry.yarnpkg.com fails to pick it up? 🤔

efstathiosntonas avatar Jan 09 '24 12:01 efstathiosntonas

Seems like this is the commit that introduce the new version dependency that yarn can't find https://github.com/dotansimha/graphql-code-generator/commit/eaa3d60c11afbe86ba269b2a488891f83089fa03

Tobbe avatar Jan 12 '24 12:01 Tobbe