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 '??=' #1315

Closed
tomavic opened this issue Aug 16, 2023 · 12 comments
Closed

SyntaxError: Unexpected token '??=' #1315

tomavic opened this issue Aug 16, 2023 · 12 comments

Comments

@tomavic
Copy link

tomavic commented Aug 16, 2023

Description

I am using npx lint-staged and I am getting this error.

Steps to reproduce

Run npx lint-staged

Debug Logs

SyntaxError: Unexpected token '??='
expand to view
COPY THE DEBUG LOGS HERE

Environment

$ ng version      

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 15.2.9
Node: 14.21.3
Package Manager: npm 6.14.18
OS: darwin arm64

Angular: 15.2.9
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, platform-browser, platform-browser-dynamic
... router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1502.9
@angular-devkit/build-angular   15.2.9
@angular-devkit/core            15.2.9
@angular-devkit/schematics      15.2.9
@angular/localize               15.2.8
@schematics/angular             15.2.9
ng-packagr                      15.2.2
rxjs                            7.8.1
typescript                      4.9.5
    
@tomavic
Copy link
Author

tomavic commented Aug 16, 2023

The problem in your releases.
You have releases v13.3.0 and you have used listr2@6.x which was a breaking change.
In your previous release v13.2.3 you was using listr2@5.x

@iiroj
Copy link
Member

iiroj commented Aug 16, 2023

See #1289. I messed up the release, it should have skipped 13.3.0 and gone to 14.0.0 directly.

Please upgrade to at least Node.js 16.14.0, 14 is no longer supported.

@iiroj iiroj closed this as completed Aug 16, 2023
@iiroj iiroj pinned this issue Aug 16, 2023
@tomavic
Copy link
Author

tomavic commented Aug 17, 2023

Hey bud, you can't just close it this easy.
I am not able to upgrade to Node 16.x right now. Otherwise I would've done that without posting an issue. 😅

@tomavic
Copy link
Author

tomavic commented Aug 17, 2023

Now all my piplines and local development has been broken because of this.

Can you clarify why you need to use listr2@6.x instead of listr2@5.x

@okonet
Copy link
Collaborator

okonet commented Aug 17, 2023

If you can’t upgrade the node, downgrade this package to 13.2. No drama is necessary.

@tomavic
Copy link
Author

tomavic commented Aug 17, 2023

@okonet

That's what we did :)

You can lock this release and mention that in the docs too. As most of the users are using npx lint-staged and it will make issues for some users.

Plus, most of users can not upgrade to higher version of node, just to use your package.

Alternatives are everywhere.

@okonet
Copy link
Collaborator

okonet commented Aug 17, 2023

I’ll deprecate the npm release when I’m back from vacation.

@maxenz
Copy link

maxenz commented Sep 14, 2023

having the same problem, cant upgrade to node 16. trick was to do this:

npm uninstall lint-staged
npm install lint-staged@13.2.3

i dont know why but installing 13.2.0 was actually installing version 13.3.0

@tomavic
Copy link
Author

tomavic commented Sep 18, 2023

@maxenz you should use npm i --save-exact lint-staged@13.0.2

@medikoo
Copy link

medikoo commented Nov 16, 2023

I've just approached it. Why v13.3 is still not deprecated? @okonet ?

@tomavic
Copy link
Author

tomavic commented Nov 19, 2023

@medikoo maybe he still in a vacation

I’ll deprecate the npm release when I’m back from vacation.

@iiroj
Copy link
Member

iiroj commented Nov 20, 2023

I have added a mention into the GitHub release for 13.3.0 and the README's migration section about it accidentally being the same version as 14.0.0. I'll lock this topic for now because there's nothing to be gained anymore.

@lint-staged lint-staged locked as off-topic and limited conversation to collaborators Nov 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

5 participants