kamilkisiela / graphql-config

One configuration for all your GraphQL tools (supported by most tools, editors & IDEs)
https://the-guild.dev/graphql/config
MIT License
1.16k stars 93 forks source link

Unable install in pnpm #1366

Closed nodegin closed 1 year ago

nodegin commented 1 year ago

Issue workflow progress

Progress of the issue based on the Contributor Workflow


Describe the bug

To Reproduce Steps to reproduce the behavior:

With latest @graphql-codegen/cli release, which uses graphql-config@5.0.1, I cannot install dependencies with pnpm install command,

Screen Shot 2023-05-24 at 17 42 53

It seems this package has a mistake on package.json file where the engines specifies

  "engines": {
    "node": ">= 16.0.0",
    "pnpm": "7.32.4"
  }

forcing pnpm to be only able to install with v7.32.4.

I guess the line is missing a >= operator?

Expected behavior

It shouldn't require explicitly v7.32.4 to install.

Environment:

Additional context

nodegin commented 1 year ago

PS: This issue probably only happen when you have a .npmrc file in your project with the following content: engine-strict=true

niklasnatter commented 1 year ago

Thanks for reporting! We are running into this issue too and I think the only workaround is to remove the engine-strict=true for now.

jstans commented 1 year ago

Looks like this was caused by https://github.com/kamilkisiela/graphql-config/pull/1356 (switching from yarn to pnpm internally).

I'm not sure if the engine flag should be needed though, especially since it was never used for any other package manager. Perhaps a PR to make it ">=7.32.4" at least is in order; if not removing it entirely?

Personally I make use of the engine-strict flag to prevent accidental installs via npm, so removing engine-strict isn't ideal.

dotansimha commented 1 year ago

We are working on a fix. We'll ship a new version without this constraint soon.

dotansimha commented 1 year ago

Fixed in graphql-config@5.0.2. We'll do an upstream fix for codegen and other packages that depends on this one.