TanStack / TanStack/devtools

`intent` bin conflicts with @tanstack/intent and imports removed subpath

Abierto Apto para principiantes
#525 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
TypeScript
Estrellas
499
Forks
100
Merge medio
1 d 17 h
PR fusionados (30 d)
4

Descripción

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).

  1. Install the dependencies in the minimum reproducible example project
  2. 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.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Comienza con bin/intent.js y las declaraciones bin del paquete; después reproduce la colisión usando el ejemplo mínimo reproducible enlazado con npm install y npm run help. Comprueba qué paquete proporciona node_modules/.bin/intent y verifica que el comando ya no genera ERR_PACKAGE_PATH_NOT_EXPORTED mientras ambas dependencias estén instaladas.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
node.js, typescript
Área
cli, tooling
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Activo
Claridad
Bien especificado
Aptitud para principiantes
78/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.