Node.js support for IntelliJ IDEA Community. Run and debug JavaScript and TypeScript tests, package.json scripts and plain Node files β with a real pass/fail test tree β without a WebStorm licence.
Everything runs against the tools the project already has in its own node_modules. Nothing is
downloaded, nothing is installed into your project, and nothing is executed until you trust the
project.
| βΆ Run any test from the gutter | Click the arrow next to a describe, it or test to run just that one. |
| π² A real test tree | Nested suites, per-test timings, and Click to see difference on assertion failures. |
| π Debugger | Breakpoints in test files and plain scripts, or attach to a running node --inspect. |
| π¦ package.json scripts | A βΆ beside every script; npm / yarn / pnpm / bun detected automatically. |
| π§© Package tab | A form for the manifest, a grid of scripts to run and debug, and a dependency table that adds, removes and updates through the project's own package manager. |
| π npm tool window | Every package.json in the project with its scripts and dependencies beneath it. |
| π Dependency drift | package.json, the lockfile and node_modules checked against each other, with a banner offering the install that fixes it. |
| π¨ ESLint + Prettier | Inline ESLint warnings; Ctrl+Alt+L formats with the project's own Prettier. |
| π Coverage | Run with Coverage on any Node test configuration: gutter stripes, per-file percentages in the Coverage tool window, and the IDE's own coverage menu. |
π .env editor |
Highlighting, duplicate-key warnings, and a key/value grid beside the text. |
| π‘ Completion & imports | Optional: drives the project's typescript-language-server over LSP. |
| βοΈ Node.js SDK | A real SDK type in Project Structure, auto-detected from PATH, nvm and fnm. |
From the Marketplace β Settings β Plugins β Marketplace β search NodeSpark β Install, or
grab it from the JetBrains Marketplace page directly.
From disk β download the .zip from Releases, then
Settings β Plugins β β β Install Plugin from Disk and restart.
Two zips are published. Take the one matching your IDE: 241.x for 2024.1 β 2025.3, 262.x for
2026.2 and later. (Why two: CONTRIBUTING.md.)
Requires IntelliJ IDEA Community or Ultimate and a Node.js install. Does not require WebStorm.
1. Open a Node.js project. Any project with Jest, Vitest, Mocha or node --test tests works
with no configuration.
2. Open a test file and click βΆ in the gutter.
The run opens in the Run window with a live pass/fail tree.
3. That's it. Click the arrow beside a describe to run that whole suite, or beside an it to
run the single test; the arrow's menu also holds Debug and Run with Coverage. Right-click anywhere in the file β
Run '.test.js' runs the lot. Each run configuration is named after the describe chain it
came from β UserService > login > returns a token β and can be edited afterwards.
Only if something needs pointing at: add a Node.js SDK under
File β Project Structure β SDKs β + β Node.js, then pick it in Settings β NodeSpark.
| Runner | Detected | Single test | Test tree |
|---|---|---|---|
| Jest | β | --testNamePattern |
β |
| Vitest | β | -t |
β |
| Mocha | β | --grep |
β |
node --test |
β | --test-name-pattern |
β |
The runner is read from the test script in package.json first, then the declared dependency,
then a config file, then node_modules/.bin β declared intent beats what merely happens to be
installed. Falls back to the built-in node --test. Override it in Settings β NodeSpark.
Test files are recognised as *.test.* / *.spec.* (.js .mjs .cjs .ts .mts) and anything inside
__tests__/. Supported syntax:
describe('suite', () => { // βΆ
it('works', () => { ... }); // βΆ
test('also works', () => { ... }); // βΆ
test.only('focused', () => { ... });
it.skip('skipped', () => { ... });
});The Structure tool window shows the same describe/it outline.
Set a breakpoint and click the bug icon in the gutter, or debug a saved run configuration. Plain
.js/.ts files debug the same way. To attach to a process you started yourself, add an Attach to
Node.js run configuration pointing at the node --inspect port.
A βΆ appears beside every entry in "scripts". The package manager comes from the packageManager
field of package.json, else the lockfile (npm / yarn / pnpm / bun), unless
Settings β NodeSpark β Node.js SDK pins one. A project with dependencies but no node_modules
gets an editor banner offering to install them.
The npm tool window lists every package.json in the project with its scripts and dependencies
beneath it: double-click (or Enter) runs a script, the toolbar debugs it, and a dependency opens its
installed package.json.
Open a package.json and switch to Package, beside the text editor: the manifest fields as a
form, the scripts as a grid you can run and debug from, and the dependencies as a filterable table
of what is declared, what is installed and β on request β what the registry has newer. Adding,
removing, updating and moving a package between runtime and development all run the project's own
package manager, so the lockfile keeps up. Nothing contacts the registry until you ask it to.
package.json, the lockfile and node_modules are checked against each other β the state a git pull leaves behind, which nothing otherwise reports until something fails at runtime. The banner
offers the install that fixes it: a plain install when the lockfile is behind package.json, a frozen
one (npm ci and its equivalents) when only node_modules is behind the lockfile. npm, yarn
(classic and berry), pnpm and bun.
ESLint problems are annotated inline as you type. Reformat Code (Ctrl+Alt+L) runs the
project's own Prettier on .js/.jsx/.ts/.tsx, and code that differs from Prettier's output is
flagged with a Reformat with Prettier fix (Ctrl+Alt+Shift+P). Format-on-save is optional.
Both are advisory, both switch off under Settings β NodeSpark β ESLint / Prettier, and neither does anything in a project without its own ESLint or Prettier.
Click any gutter arrow and pick Run with Coverage β the same menu holds Run and Debug β or use the Run with Coverage button beside Run and Debug.
The IDE handles the rest: covered and uncovered lines striped into the gutter, per-file and
per-directory percentages in the Coverage tool window and the Project view, and
Run β Show Coverage Data to switch between reports. Jest, Vitest and node --test need nothing
installed beyond what they already use; Mocha needs nyc (npm install --save-dev nyc).
Two extras under Tools β Node Coverage, for what a single test configuration cannot say: Run All Tests with Coverage covers the whole project, and Show Coverage from lcov.info loads a report produced elsewhere β a CI run, say.
.env, .env.local, .env.production and friends get syntax highlighting, key completion from
sibling files, and a warning on duplicate keys. A second tab beside the text editor shows the
file as an editable key/value grid.
When a .env.example sits next to the file you are editing, a banner offers to fill in the keys
it is missing. Right-click any .env β New Env File from This... to create a sibling with the
same keys and no values.
IntelliJ Community ships no JavaScript language support, so completion has to come from
tsserver over LSP:
- Install LSP4IJ from the Marketplace
- Tick Settings β NodeSpark β Code completion and imports
- A banner offers to add
typescript+typescript-language-serverto the project's own dev dependencies β or install them yourself
Completion, auto-import, go-to-definition, hover and rename then work for .js and .ts. The
server is only launched if the project already has it, and only in a trusted project; one node
process runs per project while it is enabled.
- A Node.js SDK type under
File β Project Structure β SDKs, auto-detected from PATH, nvm, fnm and the usual install directories. Node 18 / 20 / 22 can coexist. - A Node.js module type, and per-module SDK selection in the module's Dependencies tab.
- Import an existing
package.jsonviaModules β Add β Import Module β Import module from external model β Node.js(sets the content root, excludesnode_modulesfrom indexing; needs the bundled Java plugin, which owns that extension point). - Run configurations resolve the SDK module-first, then project, then the first registered Node.js SDK β no path to type in anywhere.
Settings β NodeSpark (applies to all projects):
| Setting | Default | Description |
|---|---|---|
| Node.js path | node |
Used when no SDK is configured |
| npm path | npm |
Used when no SDK is configured |
| Default env vars | NODE_ENV=test |
Injected into every test run |
| Auto-detect runner | β | Test script β dependency β config file β node_modules/.bin |
| Runner override | β | Force a runner when auto-detect is off |
| Code completion and imports | β | Requires LSP4IJ; see above |
Settings β NodeSpark β ESLint / Prettier: enable/disable each, and format-on-save.
Settings β NodeSpark β Node.js SDK (per project): which registered SDK this project uses; auto-detect takes the first available.
| IntelliJ IDEA | Build zip |
|---|---|
| 2024.1 β 2025.3 | node-spark-241.x.zip |
| 2026.2 + | node-spark-262.x.zip |
Community or Ultimate. Node.js is installed separately.
demo/ is a small Jest + Vitest project used to exercise the plugin β 50 tests across four files,
plus a .env pair for the env editor. ./gradlew runIde opens it in a sandboxed IDE
automatically.
cd demo && npm install && npm testBuild instructions, the two-variant explanation, and PR and issue guidelines are in CONTRIBUTING.md.







