build fails: Unknown file extension ".ts"
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 30/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- graphql, typescript
- Área
- build-system, cli
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 185
- Forks
- 49
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de graphprotocol/graph-client
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
graphprotocol/graph-client#1029 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
graphprotocol/graph-client#1031 · 4 comentarios ·
-
[Bug] The order data source under sources tab in .graphclientrc.yml affects the query resultPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
graphprotocol/graph-client#1001 · 1 comentario ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 50/100
graphprotocol/graph-client#991 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 28/100
graphprotocol/graph-client#957 ·
Todos los issues de graphprotocol/graph-client
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
better-auth/better-auth#11723 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
area: docs difficulty: easy documentation good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Worker-Erstellung bricht langsame Git-Worktree-Checkouts nach 20 Sekunden abPosiblemente ocupada @KajoVanBuyten la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
AgentSystemLabs/agent-office#367 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
pierrecomputer/pierre#1187 ·
Los mantenedores suelen responder en 1 día
-
area: frontend bug
Dificultad 1/5 1-3 horas Aptitud para principiantes 85/100
snapotter-hq/SnapOtter#2425 ·
Los mantenedores suelen responder en 1 día