Nodejs Application Crashes by only importing redis. I am not even using it any where else.
Just import redis from "redis"
is throwing me this error.
Node & Redis Version:
❯ node -v v18.13.0
-
"redis": "^4.5.1"
This is my server index.js file:
index.js
Error:
/Users/debanjantewary/Desktop/YSG/server/node_modules/@redis/client/dist/lib/cluster/cluster-slots.js:65
if (node.client.options?.readonly)
^
SyntaxError: Invalid or unexpected token
at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
Node.js v18.13.0
Tried solution But didn't work:
Clear cache node
Re-install Node stable version
Please help If anyone knows. Thank you ❤️
Top comments (1)
hey , did you manage to get through this error ? Even i m getting the same error . Any help would be appreciated