`intent` bin conflicts with @tanstack/intent and imports removed subpath
Personne n'a encore pris cette issue.
- Langage dominant
- TypeScript
- Étoiles
- 499
- Forks
- 100
- Merge moyen
- 1 j 17 h
- PR mergées (30 j)
- 4
Description
TanStack Devtools version
v0.14.2
Framework/Library version
React v19.2.8; Node v24.20.0; Npm v11.19.0
Describe the bug and the steps to reproduce it
When installing the package dependencies in my project that include both @tanstack/intent and @tanstack/devtools, I've found there is a collision between these two package's bin outputs. They both define "bin": { "intent": "..." } in their respective package.json, but @tanstack/devtools's bin output (implemented at bin/intent.js) tries to import '@tanstack/intent/intent-library' which results in a ERR_PACKAGE_PATH_NOT_EXPORTED error as this export path was removed from @tanstack/intent (there is a reference to the Intent issue below).
In both my React project and in the minimum reproducible example provided, running npm ci/npm i resolves node_modules/.bin/intent to the bin output from @tanstack/devtools rather than @tanstack/intent. Another engineer on my team sees this same behaviour, but another engineer can correctly resolve @tanstack/intent's bin at node_modules/.bin/intent.
Reproducible steps
In the minimum reproducible example there is a simple node project which has two dependencies (intent and devtools).
- Install the dependencies in the minimum reproducible example project
- Run
npm run help
The node_modules/.bin/intent resolves to devtool's, then running npm run help executes intent help and because the incorrect intent bin is installed, an ERR_PACKAGE_PATH_NOT_EXPORTED error is thrown.
Intent issue #143 removed intent-library from @tanstack/intent's exports.
Breaking: anything invoking intent-library directly must move to the normal intent discovery flow. No compatibility shim.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
https://github.com/zlo120/intent-bin-min-repro-example/tree/main
Screenshots or Videos (Optional)
No response
Do you intend to try to help solve this bug with your own PR?
Yes, I think I know how to fix it and will discuss it in the comments of this issue
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Piste de recherche
Commencez par bin/intent.js et les déclarations bin du package, puis reproduisez la collision à l’aide de l’exemple minimal reproductible lié avec npm install et npm run help. Vérifiez quel package fournit node_modules/.bin/intent et confirmez que la commande ne déclenche plus ERR_PACKAGE_PATH_NOT_EXPORTED lorsque les deux dépendances sont installées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- node.js, typescript
- Domaine
- cli, tooling
- Type d'issue
- Bug
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- Active
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 78/100