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

grunt v1.6.0 throwing error "SyntaxError: Unexpected token '.'" through npm rimraf package. #1752

Closed
artbindu opened this issue Jan 30, 2023 · 6 comments

Comments

@artbindu
Copy link

artbindu commented Jan 30, 2023

grunt v1.6.0 throwing error "SyntaxError: Unexpected token '.'" through npm rimraf package.

Some braking changes happening in latest grunt changes.

I am using node & npm version as:

node: v12.16.1
npm: 6.13.4

I am getting errors like:
Screenshot 2023-01-30 at 3 17 48 PM

When I see the npm rimraf they did some changes few days ago.
But at the end of the day, I see the issue is happening from grant version.


I see issue is not happening until grunt v1.5.3.
Issue is reproducing in latest version: grunt v1.6.0

I think the issue may be happening from es5 or es6 syntax related.

@artbindu
Copy link
Author

artbindu commented Jan 30, 2023

I have checked with this configuration

 "rimraf": "4.1.1", // older
 "grunt": "^1.6.0",

and issue is still reproducing

@RobinBol
Copy link

RobinBol commented Jan 30, 2023

Apparently as of grunt@1.6.x Node 16 or higher is required. Been debugging this for a while myself.. Maybe a major bump would have been better?

Just pin grunt at 1.5.3 to fix it for now.

@vladikoff
Copy link
Member

@artbindu could you try your project with node.js 14 or 16? 12 is really outdated.

@artbindu
Copy link
Author

artbindu commented Jan 31, 2023

The issue is still reproducing with node v14. But in node v16 I did not see the issue with the latest grunt version(v1.6.x).
Temporarily I fixed that with grunt 1.5.3.

Thanks @RobinBol, thanks @vladikoff for your suggestion.

You may close the ticket.

@vladikoff
Copy link
Member

Fixed in 1.6.1 . thanks for the report!

@artbindu
Copy link
Author

artbindu commented Feb 8, 2023

Yes, it's resolved in grunt 1.6.1.

Thank you @vladikoff

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

No branches or pull requests

3 participants