[GH-ISSUE #2910] [bug]: 'pnpm install' failed, maybe because something wrong with 'GraphQL' #942

Closed
opened 2026-03-16 17:46:28 +03:00 by kerem · 2 comments
Owner

Originally created by @fritz1149 on GitHub (Jan 31, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2910

Originally assigned to: @aitchnyu on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

I enter the directory of hoppscotch, having installed pnpm, and run 'pnpm install'.
Things seem go well at first, but then it failed. From the output, I guess maybe there is something wrong with things about 'GraphQL'.
The output is :

packages/hoppscotch-common postinstall$ pnpm run gql-codegen
│ > @hoppscotch/common@3.0.1 gql-codegen E:\Projects\hoppscotch\packages\hoppscotch-common
│ > graphql-codegen --require dotenv/config --config gql-codegen.yml dotenv_config_path="../../.env"
│ [STARTED] Parse Configuration
│ [SUCCESS] Parse Configuration
│ [STARTED] Generate outputs
│ [STARTED] Generate src/helpers/backend/graphql.ts
│ [STARTED] Load GraphQL schemas
│ [FAILED] Failed to load schema
│ [STARTED] Generate src/helpers/backend/backend-schema.json
│ [STARTED] Load GraphQL schemas
│ [FAILED] Failed to load schema
│ Failed to load schema for "src/helpers/backend/backend-schema.json"
│ Failed to load schema from undefined:

│ Unable to find any GraphQL type definitions for the following pointers:

│ - undefined

│ Error:
│ Unable to find any GraphQL type definitions for the following pointers:

│ - undefined

│ at prepareResult (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_module
│ at loadTypedefs (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_modules
│ at processTicksAndRejections (internal/process/task_queues.js:93:5)
│ at async loadSchema (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_mod
│ at async loadSchema (E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async Task.run (E:\Projects\hoppscotch\node_modules.pnpm\listr2@4.0.5\node_modules\listr2\dist\index.cjs:979
│ at async E:\Projects\hoppscotch\node_modules.pnpm\p-map@4.0.0\node_modules\p-map\index.js:57:22
│ GraphQL Code Generator supports:
│ - ES Modules and CommonJS exports (export as default or named export "schema")
│ - Introspection JSON File
│ - URL of GraphQL endpoint
│ - Multiple files with type definitions (glob expression)
│ - String in config file
│ Try to use one of above options and run codegen again.

│ Failed to load schema for "src/helpers/backend/backend-schema.json"
│ Failed to load schema from undefined:

│ Unable to find any GraphQL type definitions for the following pointers:

│ - undefined

│ Error:
│ Unable to find any GraphQL type definitions for the following pointers:

│ - undefined

│ at prepareResult (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_module
│ at loadTypedefs (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_modules
│ at processTicksAndRejections (internal/process/task_queues.js:93:5)
│ at async loadSchema (E:\Projects\hoppscotch\node_modules.pnpm@graphql-tools+load@7.7.0_graphql@15.8.0\node_mod
│ at async loadSchema (E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async E:\Projects\hoppscotch\node_modules.pnpm@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo
│ at async Task.run (E:\Projects\hoppscotch\node_modules.pnpm\listr2@4.0.5\node_modules\listr2\dist\index.cjs:979
│ at async E:\Projects\hoppscotch\node_modules.pnpm\p-map@4.0.0\node_modules\p-map\index.js:57:22
│ GraphQL Code Generator supports:
│ - ES Modules and CommonJS exports (export as default or named export "schema")
│ - Introspection JSON File
│ - URL of GraphQL endpoint
│ - Multiple files with type definitions (glob expression)
│ - String in config file
│ Try to use one of above options and run codegen again.

│ [SUCCESS] Generate outputs
│  ELIFECYCLE  Command failed with exit code 1.
└─ Failed in 4s at E:\Projects\hoppscotch\packages\hoppscotch-common
 ELIFECYCLE  Command failed with exit code 1.

Steps to reproduce

  1. Go to directory of hoppscotch
  2. pnpm install

Environment

Production

Version

Local

Originally created by @fritz1149 on GitHub (Jan 31, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/2910 Originally assigned to: @aitchnyu on GitHub. ### Is there an existing issue for this? - [x] I have searched the existing issues ### Current behavior I enter the directory of hoppscotch, having installed pnpm, and run 'pnpm install'. Things seem go well at first, but then it failed. From the output, I guess maybe there is something wrong with things about 'GraphQL'. The output is : packages/hoppscotch-common postinstall$ pnpm run gql-codegen │ > @hoppscotch/common@3.0.1 gql-codegen E:\Projects\hoppscotch\packages\hoppscotch-common │ > graphql-codegen --require dotenv/config --config gql-codegen.yml dotenv_config_path="../../.env" │ [STARTED] Parse Configuration │ [SUCCESS] Parse Configuration │ [STARTED] Generate outputs │ [STARTED] Generate src/helpers/backend/graphql.ts │ [STARTED] Load GraphQL schemas │ [FAILED] Failed to load schema │ [STARTED] Generate src/helpers/backend/backend-schema.json │ [STARTED] Load GraphQL schemas │ [FAILED] Failed to load schema │ Failed to load schema for "src/helpers/backend/backend-schema.json" │ Failed to load schema from undefined: │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - undefined │ │ Error: │ Unable to find any GraphQL type definitions for the following pointers: │ │ - undefined │ │ at prepareResult (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_module │ at loadTypedefs (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_modules │ at processTicksAndRejections (internal/process/task_queues.js:93:5) │ at async loadSchema (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_mod │ at async loadSchema (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async Task.run (E:\Projects\hoppscotch\node_modules\.pnpm\listr2@4.0.5\node_modules\listr2\dist\index.cjs:979 │ at async E:\Projects\hoppscotch\node_modules\.pnpm\p-map@4.0.0\node_modules\p-map\index.js:57:22 │ GraphQL Code Generator supports: │ - ES Modules and CommonJS exports (export as default or named export "schema") │ - Introspection JSON File │ - URL of GraphQL endpoint │ - Multiple files with type definitions (glob expression) │ - String in config file │ Try to use one of above options and run codegen again. │ │ Failed to load schema for "src/helpers/backend/backend-schema.json" │ Failed to load schema from undefined: │ │ Unable to find any GraphQL type definitions for the following pointers: │ │ - undefined │ │ Error: │ Unable to find any GraphQL type definitions for the following pointers: │ │ - undefined │ │ at prepareResult (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_module │ at loadTypedefs (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_modules │ at processTicksAndRejections (internal/process/task_queues.js:93:5) │ at async loadSchema (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-tools+load@7.7.0_graphql@15.8.0\node_mod │ at async loadSchema (E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async E:\Projects\hoppscotch\node_modules\.pnpm\@graphql-codegen+cli@2.8.0_h5eoywvcjsa4emif44kddonyyu\node_mo │ at async Task.run (E:\Projects\hoppscotch\node_modules\.pnpm\listr2@4.0.5\node_modules\listr2\dist\index.cjs:979 │ at async E:\Projects\hoppscotch\node_modules\.pnpm\p-map@4.0.0\node_modules\p-map\index.js:57:22 │ GraphQL Code Generator supports: │ - ES Modules and CommonJS exports (export as default or named export "schema") │ - Introspection JSON File │ - URL of GraphQL endpoint │ - Multiple files with type definitions (glob expression) │ - String in config file │ Try to use one of above options and run codegen again. │ │ [SUCCESS] Generate outputs │  ELIFECYCLE  Command failed with exit code 1. └─ Failed in 4s at E:\Projects\hoppscotch\packages\hoppscotch-common  ELIFECYCLE  Command failed with exit code 1. ### Steps to reproduce 1. Go to directory of hoppscotch 2. pnpm install ### Environment Production ### Version Local
kerem 2026-03-16 17:46:28 +03:00
Author
Owner

@aitchnyu commented on GitHub (Feb 2, 2023):

You are likely to be missing .env file. Please run $ cp .env.example .env and then run pnpm install again.

<!-- gh-comment-id:1413746797 --> @aitchnyu commented on GitHub (Feb 2, 2023): You are likely to be missing `.env` file. Please run `$ cp .env.example .env` and then run `pnpm install` again.
Author
Owner

@fritz1149 commented on GitHub (Feb 3, 2023):

You are likely to be missing .env file. Please run $ cp .env.example .env and then run pnpm install again.

Thank you! The problem is solved!

<!-- gh-comment-id:1415143383 --> @fritz1149 commented on GitHub (Feb 3, 2023): > You are likely to be missing `.env` file. Please run `$ cp .env.example .env` and then run `pnpm install` again. Thank you! The problem is solved!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#942
No description provided.