build fails: Unknown file extension ".ts"
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 30/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- graphql, typescript
- 領域
- build-system, cli
調査の方向性
Start with the graphclient build path that handles the --fileType ts option and compare it with the default generation path that fails while loading .graphclient/sources/uniswapv2/introspectionSchema.ts. Reproduce the failure in a fresh Astro project with TypeScript enabled, then verify that npx graphclient build succeeds without the workaround.
索引モデルが issue の本文から書いたものです。
説明
Problem
Similarly to #409, I was just following the tutorial from https://thegraph.com/docs/en/querying/querying-from-an-application/ and it failed at the code generation step.
➜ npx graphclient build
(node:9415) ExperimentalWarning: stream/web is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
💡 GraphClient Cleaning existing artifacts
💡 GraphClient Reading the configuration
💡 GraphClient Generating the unified schema
💥 GraphClient - uniswapv2 Failed to generate the schema Error: Failed to fetch introspection from https://api.thegraph.com/subgraphs/name/uniswap/uniswap-v2: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /home/daniel/repos/my-project/my-project-ui/.graphclient/sources/uniswapv2/introspectionSchema.ts
at new NodeError (node:internal/errors:371:5)
at Object.file: (node:internal/modules/esm/get_format:72:15)
at defaultGetFormat (node:internal/modules/esm/get_format:85:38)
at defaultLoad (node:internal/modules/esm/load:13:42)
at ESMLoader.load (node:internal/modules/esm/loader:303:26)
at ESMLoader.moduleProvider (node:internal/modules/esm/loader:230:58)
at new ModuleJob (node:internal/modules/esm/module_job:63:26)
at ESMLoader.getModuleJob (node:internal/modules/esm/loader:244:11)
at async Promise.all (index 0)
at async ESMLoader.import (node:internal/modules/esm/loader:281:24) {
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
at GraphQLHandler.getMeshSource (/home/daniel/repos/my-project/my-project-ui/node_modules/@graphql-mesh/graphql/cjs/index.js:339:23)
at async /home/daniel/repos/my-project/my-project-ui/node_modules/@graphql-mesh/runtime/cjs/get-mesh.js:128:28
💥 GraphClient Error: Schemas couldn't be generated successfully. Check for the logs by running Mesh with DEBUG=1 environmental variable to get more verbose output.
at getMesh (/home/daniel/repos/my-project/my-project-ui/node_modules/@graphql-mesh/runtime/cjs/get-mesh.js:162:15)
at async Object.handler (/home/daniel/repos/my-project/my-project-ui/node_modules/@graphql-mesh/cli/cjs/index.js:311:53)
The code is a fresh astro project created with npm create astro@latest and with Typescript enabled.
Fixes
- I tried adding
ts-nodeas suggested by this tutorial I've look into https://graphql.wtf/episodes/45-the-graph-client. Did not work. - I tried using a different
tsconfig.json. Did not work.
What works is calling npx graphclient build --fileType ts as seen in this tutorial: https://www.youtube.com/watch?v=Wsq2fopq4BQ.
- 主要言語
- TypeScript
- スター
- 185
- フォーク
- 49
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
graphprotocol/graph-client のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
graphprotocol/graph-client#1029 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
graphprotocol/graph-client#1031 · コメント 4 件 ·
-
[Bug] The order data source under sources tab in .graphclientrc.yml affects the query result対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
graphprotocol/graph-client#1001 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 50/100
graphprotocol/graph-client#991 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 28/100
graphprotocol/graph-client#957 ·
graphprotocol/graph-client の issue をすべて見る
似ている issue
-
effort:S priority:P2
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
cameri/nostream#811 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
dam-agents/dam#4562 ·
メンテナーはふだん 1 日以内に返信
-
bug p3 triaged
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
bug javascript P2-medium python release:v3.1
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
adrirubio/claude-deck#546 ·
メンテナーはふだん 1 日以内に返信