Skip to content
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

SyntaxError: Unexpected token '??=' in @redis/client #2616

Closed
ashfaqhaq opened this issue Sep 20, 2023 · 5 comments
Closed

SyntaxError: Unexpected token '??=' in @redis/client #2616

ashfaqhaq opened this issue Sep 20, 2023 · 5 comments
Labels

Comments

@ashfaqhaq
Copy link

Description

Issue description:

While running my Next.js application, I encountered a syntax error originating from the @redis/client module.

Error Details:

File: /var/app/current/node_modules/@redis/client/dist/lib/client/index.js
Line: 195
Error: this[name.toLowerCase()] ??= this[name];
        ^^^
       SyntaxError: Unexpected token '??='

Stack Trace:
- at wrapSafe (internal/modules/cjs/loader.js:1029:16)
- at Module._compile (internal/modules/cjs/loader.js:1078:27)
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
- at Module.load (internal/modules/cjs/loader.js:979:32)
- at Function.Module._load (internal/modules/cjs/loader.js:819:12)
- at Module.require (internal/modules/cjs/loader.js:1003:19)
- at require (internal/modules/cjs/helpers.js:107:18)
- at Object.<anonymous> (/var/app/current/node_modules/@redis/client/dist/index.js:18:18)
- at Module._compile (internal/modules/cjs/loader.js:1114:14)
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)

Additional Information:
npm ERR! code ELIFECYCLE

Environment Details:

  • Node.js version: Node.js 14 running on 64bit Amazon Linux 2/5.8.5
  • Next.js version: "next": "^10.0.4",

Node.js Version

14

Redis Server Version

No response

Node Redis Version

No response

Platform

Linux

Logs

No response

@ashfaqhaq ashfaqhaq added the Bug label Sep 20, 2023
@CuteTechGuy
Copy link

CuteTechGuy commented Sep 20, 2023

You should use node v15 or higher. The last version [email protected] has some breaking changes for the node v14. Also node v14 is deprecated and I suggest you to use v16 or v18 which is LTS for now. Or you can fix your redis to 4.6.0 as a temporary solution.
ref:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Nullish_coalescing_assignment

@grelca
Copy link

grelca commented Sep 20, 2023

while i agree that we should all be updating our EOL node versions, patch versions should not introduce breaking changes. i would call dropping support for older node versions a breaking change.

@davebullock-ujet
Copy link

This is a breaking change and should be rolled back.

@bsaracalign
Copy link

bsaracalign commented Sep 20, 2023

Can you guys please do a major or minor release if you are updating something that'll break people's working stuff? All morning our builds are failing and while I do agree people should keep their stuff up to date and you do that too, which is great but make major or minor update so it doesn't screw up 100,000 applications that are using this and running fine...

@abhisheksingh75
Copy link

Ya same is happing with us...is there any update on this issue

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

No branches or pull requests

7 participants