# React Native: Fix BABEL Cannot Find Module node:path

> Fix the BABEL Cannot find module node:path error in React Native by upgrading to Node.js 22 or later, which supports explicit node: import syntax

**URL:** https://sentry.io/answers/babel-cannot-find-module-node-path-error-react-native/

---

## The Problem

You receive the following error when you build your React Native JavaScript bundle:

```
index.js: [BABEL]: Cannot find module 'node:path'
```

## The Solution

This error occurs when you use a version of Node older than version 14.18, which introduced the `node:path` module. However, Node 14 reached end-of-life in April 2023, so rather than upgrading to the minimum 14.18, you should upgrade to a currently-supported Node.js LTS release (Node 22 or later).

Check your Node version by running the following command:

```sh
node -v
```

If you need to use multiple versions of Node, you can use a tool such as [Node Version Manager (NVM)](https://github.com/nvm-sh/nvm) to use different versions of Node for different projects. If you use Windows, use [NVM for Windows](https://github.com/coreybutler/nvm-windows).

### Note

Specifically, the error is caused by the use of [`node: import syntax`](https://nodejs.org/api/esm.html#node-imports) in Node versions that predate the addition of the `node:path` module in version 14.18, which made built-in Node module imports more explicit.

Instead of importing built-in modules like this:

```js
import { readFile } from 'fs';
```

You can import them like this:

```js
import { readFile } from 'node:fs';
```

Even if the error is triggered by a dependency, such as [NativeWind](https://www.nativewind.dev/), it can be solved by upgrading Node to version 14.18+, because `node:path` also functions to prevent dependency module imports from overwriting built-in Node module imports.

---

*Source: [sentry.io/answers/babel-cannot-find-module-node-path-error-react-native/](https://sentry.io/answers/babel-cannot-find-module-node-path-error-react-native/)*
