Skip to content

Fix Error: redisUrl is required #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pstaylor-patrick
Copy link

@pstaylor-patrick pstaylor-patrick commented Jun 17, 2025

🚧 This PR is Part of a Series

👋 TL;DR

Fix Error: redisUrl is required

🔎 Details

resolves #16

MCP Server

MCP Client

  • pnpm add -D @modelcontextprotocol/sdk@latest
  • extend package.json#scripts (test:client)

✅ How to Test

  1. run:
    #/usr/bin/env bash
    nvm install
    nvm use
    pnpm install -D
    
    # https://github.com/redis/node-redis/blob/9ea260f/packages/client/lib/client/index.ts#L33
    # replace `redis[s]://[[username][:password]@][host][:port][/db-number]` with your actual `REDIS_URL`
    echo "REDIS_URL=\"redis[s]://[[username][:password]@][host][:port][/db-number]\"" > .env.local
    
    pnpm build
    pnpm dev
  2. in another terminal, run pnpm test:client http://localhost:3000
  3. 🔴 see that the output no longer reads:
    > [email protected] dev /Users/patrick/src/servant-io/mcp-for-next.js
    > next dev
    
       ▲ Next.js 15.2.4
       - Local:        http://localhost:3000
       - Network:      http://192.168.1.52:3000
    
     ✓ Starting...
     ✓ Ready in 2.8s
     ○ Compiling /[transport] ...
     ✓ Compiled /[transport] in 1443ms (994 modules)
    Error: redisUrl is required
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at new Promise (<anonymous>)
     ⨯ unhandledRejection: Error: redisUrl is required
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at new Promise (<anonymous>)
     ⨯ unhandledRejection:  Error: redisUrl is required
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at Generator.next (<anonymous>)
        at new Promise (<anonymous>)
        at new Promise (<anonymous>)
  4. 🟢 instead, see that the output now reads:
    > [email protected] dev /Users/patrick/src/servant-io/mcp-for-next.js
    > next dev
    
       ▲ Next.js 15.2.4
       - Local:        http://localhost:3000
       - Network:      http://192.168.1.52:3000
       - Environments: .env.local
    
     ✓ Starting...
     ✓ Ready in 1650ms
     ○ Compiling /[transport] ...
     ✓ Compiled /[transport] in 1458ms (999 modules)
    Redis error [Error: Socket closed unexpectedly]
    Redis error [Error: Socket closed unexpectedly]
    Redis error [Error: Socket closed unexpectedly]

🥜 GIF

closes-ticket-opens-ticket-works-on-my-machine

Copy link

vercel bot commented Jun 17, 2025

@pstaylor-patrick is attempting to deploy a commit to the Uncurated Tests Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🔴 Bug: Error: redisUrl is required
1 participant