# @sonar/scan 5.0 requires Node.js 22.12+ and moves to ES modules

**URL:** <https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876>\
**Category:** Sonar Updates\
**Tags:** typescript, javascript, scanner\
**Created:** [July 14, 2026, 1:04pm UTC](https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876 "2026-07-14T13:04:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michal.zgliczynski](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@michal.zgliczynski](https://community.sonarsource.com/u/michal.zgliczynski)\
**Post date:** [July 14, 2026, 1:04pm UTC](https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876/1 "2026-07-14T13:04:38Z")

</div>

Hey folks,

The upcoming `@sonar/scan` 5.0 release introduces two breaking changes.

First, `@sonar/scan` will require **Node.js 22.12.0 or later**. Version 5 will no longer run in environments using an older Node.js version.

Importantly, this requirement applies only to the Node.js runtime used to execute the scanner. It does not affect which JavaScript or TypeScript versions are supported.

Second, `@sonar/scan` will be published as an **ES module** instead of a CommonJS module. ES module projects can import it directly:

```auto
import { scan } from '@sonar/scan';

```

CommonJS projects should use a dynamic import:

```auto
const { scan } = await import('@sonar/scan');

```

Third, the deprecated `sonar` and `sonar-scanner` executable aliases have been removed to avoid collisions with the [SonarQube CLI](https://www.sonarsource.com/sonarqube/cli/) and [SonarScanner CLI.](https://docs.sonarsource.com/sonarqube-server/analyzing-source-code/scanners/sonarscanner)

If you invoke the globally installed scanner or reference it in a package script, migrate to:

```shell
sonar-scanner-npm

```

The package-based invocation remains unchanged:

```shell
npx @sonar/scan

```

If you cannot upgrade to Node.js 22.12 yet, you can continue using the latest 4.x release, which supports Node.js 18 and later:

```auto
npm install @sonar/scan@4.4.0

```

See the [`@sonar/scan` documentation](https://docs.sonarsource.com/sonarqube-server/latest/analyzing-source-code/scanners/npm/introduction/) for more information.

Best,

Michal Zgliczynski

---

<div class="post-metadata">

**Author:** ![michal.zgliczynski](https://avatars.discourse-cdn.com/v4/letter/m/898d66/32.png) [@michal.zgliczynski](https://community.sonarsource.com/u/michal.zgliczynski)\
**Post date:** [July 20, 2026, 12:03pm UTC](https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876/2 "2026-07-20T12:03:45Z")

</div>

Update: [`@sonar/scan` 5.0.0](https://www.npmjs.com/package/@sonar/scan/v/5.0.0) is now available.

This release:

- Requires Node.js 22.12.0 or later.
- Publishes `@sonar/scan` as an ES module.
- Replaces the deprecated `sonar` and `sonar-scanner` executables with `sonar-scanner-npm`.
- Keeps `npx @sonar/scan` unchanged.

See the [release notes and migration instructions](https://github.com/SonarSource/sonar-scanner-npm/releases/tag/5.0.0) for complete details.

If you cannot upgrade to Node.js 22.12 yet, you can remain on [`@sonar/scan` 4.4.0](https://www.npmjs.com/package/@sonar/scan/v/4.4.0).
