TS7016: Could not find a declaration file for module 'piston-client'.
- Langage dominant
- JavaScript
- Étoiles
- 32
- Forks
- 9
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
Hello! Thank you for your work on this module so far!
I'm using the version `1.0.2` of the `piston-client` module for a TypeScript project, and encountered a `TS7016` error:
```
Could not find a declaration file for module 'piston-client'. '/node_modules/piston-client/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/piston-client` if it exists or add a new declaration (.d.ts) file containing `declare module 'piston-client';`ts(7016)
```
I ran `npm i --save-dev @types/piston-client` in case and saw this was not available on `npm` yet:
```
✗ npm i --save-dev @types/piston-client
npm error code E404
npm error 404 Not Found - GET https://registry.npmjs.org/@types%2fpiston-client - Not found
npm error 404
npm error 404 '@types/piston-client@*' is not in this registry.
npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: /.npm/_logs/2025-05-29T21_58_33_985Z-debug-0.log
```
I noticed #2 which adds TypeScript support was added 2 years ago, and that the [last publish date](https://www.npmjs.com/package/piston-client?activeTab=versions) for this module was published 4 years. Was the TypeScript updated intended to be published once the above PR was merged? I'm happy to try installing it from the git url from the time being--wanted to call this out in case other devs ran into this issue!
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par lire la PR #2 et inspecter le paquet publié piston-client 1.0.2, en vérifiant notamment si sa prise en charge de TypeScript est incluse. Reproduisez l’erreur TS7016 dans un petit projet TypeScript, puis vérifiez qu’une version publiée du paquet expose les déclarations requises et ne déclenche plus l’erreur.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- javascript, node.js, typescript
- Domaine
- api, backend, release
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 38/100