adonisjs / transmit

A Server-Sent-Event module for AdonisJS
MIT License
71 stars 5 forks source link

Error: Connection is closed. when transmit provider is used #29

Closed shankiflang closed 3 weeks ago

shankiflang commented 4 weeks ago

Package version

"@adonisjs/core": "^6.14.0" "ioredis": "^5.4.1"
"@adonisjs/transmit": "^2.0.2"

Node.js v20.17.0

Describe the bug

Recently, when I run an ace command (I tried with db related commands), I get this error:

PS C:\devs\fun> node ace db:seed
❯ completed database/seeders/blockchain_seeder
❯ completed database/seeders/product_seeder
C:\devs\fun\node_modules\standard-as-callback\built\index.js:6
        throw e;
        ^

Error: Connection is closed.
    at C:\devs\fun\node_modules\ioredis\built\connectors\StandaloneConnector.js:46:28
    at process.processTicksAndRejections (node:internal/process/task_queues:77:11)

Node.js v20.17.0

I've been looking for a while and when I comment on the transmit provider, I no longer have this error. It doesn't seem that the error is present with npm run dev.

Does this come from my code or can it be an error in transmit?

Thanks!

Reproduction repo

No response

RomainLanz commented 3 weeks ago

Hey @shankiflang! 👋🏻

Can you please update your dependencies and try again?

shankiflang commented 3 weeks ago

Hey @shankiflang! 👋🏻

Can you please update your dependencies and try again?

I updated all packages using ncu and still have the error.

Here is the updated deps:

  "devDependencies": {
    "@adonisjs/assembler": "^7.8.2",
    "@adonisjs/eslint-config": "^2.0.0-beta.6",
    "@adonisjs/prettier-config": "^1.4.0",
    "@adonisjs/tsconfig": "^1.4.0",
    "@japa/api-client": "^2.0.3",
    "@japa/assert": "^3.0.0",
    "@japa/plugin-adonisjs": "^3.0.1",
    "@japa/runner": "^3.1.4",
    "@swc/core": "^1.7.28",
    "@types/luxon": "^3.4.2",
    "@types/node": "^22.7.4",
    "@types/react": "^18.3.11",
    "@types/react-dom": "^18.3.0",
    "@vitejs/plugin-react": "^4.3.2",
    "autoprefixer": "^10.4.20",
    "eslint": "^9.11.1",
    "hot-hook": "^0.3.0",
    "pino-pretty": "^11.2.2",
    "postcss": "^8.4.47",
    "prettier": "^3.3.3",
    "tailwindcss": "^3.4.13",
    "ts-node-maintained": "^10.9.4",
    "typescript": "^5.6.2",
    "vite": "^5.4.8"
  },
  "dependencies": {
    "@adonisjs/ally": "^5.0.2",
    "@adonisjs/auth": "^9.2.3",
    "@adonisjs/bouncer": "^3.1.3",
    "@adonisjs/core": "^6.14.0",
    "@adonisjs/cors": "^2.2.1",
    "@adonisjs/inertia": "^1.2.2",
    "@adonisjs/lucid": "^21.2.0",
    "@adonisjs/mail": "^9.2.2",
    "@adonisjs/session": "^7.5.0",
    "@adonisjs/shield": "^8.1.1",
    "@adonisjs/static": "^1.1.1",
    "@adonisjs/transmit": "^2.0.2",
    "@adonisjs/transmit-client": "^1.0.0",
    "@adonisjs/vite": "^3.0.0",
    "@hookform/resolvers": "^3.9.0",
    "@inertiajs/react": "^1.2.0",
    "@metaplex-foundation/mpl-token-metadata": "^3.2.1",
    "@radix-ui/react-avatar": "^1.1.1",
    "@radix-ui/react-dialog": "^1.1.2",
    "@radix-ui/react-dropdown-menu": "^2.1.2",
    "@radix-ui/react-label": "^2.1.0",
    "@radix-ui/react-select": "^2.1.2",
    "@radix-ui/react-slot": "^1.1.0",
    "@radix-ui/react-tooltip": "^1.1.3",
    "@solana/spl-token": "^0.4.8",
    "@solana/web3.js": "^1.95.3",
    "@vinejs/vine": "^2.1.0",
    "class-variance-authority": "^0.7.0",
    "clsx": "^2.1.1",
    "edge.js": "^6.2.0",
    "framer-motion": "^11.9.0",
    "ioredis": "^5.4.1",
    "lucide-react": "^0.447.0",
    "luxon": "^3.5.0",
    "mjml": "^4.15.3",
    "moment": "^2.30.1",
    "pg": "^8.13.0",
    "react": "^18.3.1",
    "react-dom": "^18.3.1",
    "react-hook-form": "^7.53.0",
    "react-icons": "^5.3.0",
    "react-inlinesvg": "^4.1.3",
    "react-router-dom": "^6.26.2",
    "react-toastify": "^10.0.5",
    "reflect-metadata": "^0.2.2",
    "tailwind-merge": "^2.5.2",
    "tailwindcss-animate": "^1.0.7",
    "use-debounce": "^10.0.3",
    "zod": "^3.23.8"
  },
RomainLanz commented 3 weeks ago

You have to update underlying dependencies, use npm update --save.

shankiflang commented 3 weeks ago

npm update --save

Yes, it seems to work! No more Connection is closed error!

Thanks

RomainLanz commented 3 weeks ago

Great!