# @upstash/redis: ReferenceError fetch is not defined

## What you see

`ReferenceError: fetch is not defined` the first time the SDK makes a
request, on Node 17 or earlier.

## Why

The SDK is HTTP based, so it needs fetch. Node only ships fetch
natively from 18 on. Vercel, Netlify, Deno, and Fastly polyfill it for
you, which is why the same code works deployed but crashes on bare
Node.

## Fix, pick one

1. Upgrade Node to 18 or later. Best option.
2. Polyfill:

npm install isomorphic-fetch
import "isomorphic-fetch";
import { Redis } from "@upstash/redis";

3. Use the bundled fetch import path:

import { Redis } from "@upstash/redis/with-fetch";

## Verify

A plain node script that constructs the client and runs PING prints
PONG with no ReferenceError.