TanStack / TanStack/devtools

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

オープン 初心者向け
#525 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
TypeScript
スター
499
フォーク
100
平均マージ
1日 17時間
マージ済み PR(30日)
4

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず bin/intent.js とパッケージの bin 宣言を確認し、リンクされた最小再現可能な例を使って npm install と npm run help で衝突を再現します。どのパッケージが node_modules/.bin/intent を提供しているかを確認し、両方の依存関係がインストールされている状態で、そのコマンドが ERR_PACKAGE_PATH_NOT_EXPORTED を発生させなくなっていることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
node.js, typescript
領域
cli, tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
活発
明瞭さ
明確に書かれている
初心者へのやさしさ
78/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。