react-inspector icon indicating copy to clipboard operation
react-inspector copied to clipboard

Not working in the docker environment

Open kd21 opened this issue 3 years ago • 5 comments

docker環境下でも使えるようになると嬉しいです。ご検討よろしくおねがいします!

具体的には以下のような状態です。 dockerfileで、以下のような感じの設定をしています。

FROM node
WORKDIR /usr/src/app
# .../usr/src/app以下にファイルをコピーする処理等

docker内では各componentが/usr/src/app以下に存在するためか、拡張機能により生成されるファイルのパスがlocal環境と食い違ってしまうため、「パスが存在しません」と表示されてしまう状況です 🙏

kd21 avatar Sep 12 '22 18:09 kd21

@kd21 なるほど。react-inspectorの動きとしては正しいのでこちらで修正を入れるべきか悩ましいです。

オプションページにて指定したfile pathを指定したfile pathへ書き換える処理を入れれば対応可能かもしれません。が、 React fiberに埋め込まれるソースコードの情報はビルド時の場所に依存するので開発サーバーをローカルで立ち上げればいいのかなと思ったり。

hand-dot avatar Sep 13 '22 06:09 hand-dot

@hand-dot なるほどです。回答ありがとうございます!

ローカルで立ち上げれば確かに動くなあと思いつつ、現状の開発環境に特に手を入れずに使えたらうれしいなあと思った次第です。

ただ、現状のreact-inspectorの提供したい機能の範囲外であればclose頂いてもちろん大丈夫です!

kd21 avatar Sep 14 '22 00:09 kd21

@kd21 ご理解いただきありがとうございます...! オプションを増やすのは他の不具合が発生する可能性があるので少し考えさせてください。 同じようなユーザーが現れる可能性があるのでこのissueは閉じずにしばらく待ちます。


I appreciate your understanding...! Please let me think about adding more options as it may cause other problems. I will wait for a while without closing this issue because there is a possibility that similar users will appear.

hand-dot avatar Sep 15 '22 15:09 hand-dot

If you want to run it in a docker environment, please react to this issue.

hand-dot avatar Sep 15 '22 15:09 hand-dot

自分用なのでめちゃ適当ですが、こちらpath置換できるようにしたforkです https://github.com/pseuxide/react-inspector

This is my fork for docker users. It's messy af yet in case anyone desperately need.

vxcall avatar Jan 26 '24 08:01 vxcall