0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

WebStormがnpmで実行するものをbunに置き換える

Last updated at Posted at 2025-04-19

経緯

WebStrom(+その他JetBrains系のIDE)の『実行/デバッグ構成』にはBunで実行できる設定があるが
どうやらpackage.json(node.jsの環境)ではなくTypeScriptの実行の機能のみだった。

image.png

Shell Scriptとしてbun devを追加することができますが...
image.png
ターミナルの別タブとして実行されるので、少々扱いずらいです。
image.png

ちなみに、Node.js(npm)の場合は『実行ツールウィンドウ』内で実行され、これが理想です。

解決方法

npmnnpmyarnに置き換える設定があったので、これでnpmbunに置き換えました。

『設定』から『言語 & フレームワーク』にある『Node.js』を開きます。
『パッケージマネージャー』の設定が変えることができるので、ここでbun.exeを指定します。
image.png
bun.exeはデフォルトで以下の箇所にあります。

C:\Users\ユーザー名\.bun\bin

確認

npmの構成を作成します。
image.png
実行をすると、npm同様『実行ツールウィンドウ』で実行され、中身のコマンドがbun runになっているのがわかります
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?