nest-cli icon indicating copy to clipboard operation
nest-cli copied to clipboard

Unable to upgrade to the latest version, node version is v16.20.2

Open LengJunT opened this issue 1 year ago • 3 comments

Did you read the migration guide?

  • [X] I have read the whole migration guide

Is there an existing issue that is already proposing this?

  • [X] I have searched the existing issues

Potential Commit/PR that introduced the regression

No response

Versions

9.5.0 > latest

Describe the regression

I want to upgrade my local nest/cli from 9.5.0 to the latest version, but I can't, it prompts me that the node version needs to be greater than 18.13. because @angular-devkit needs a high version of node. I feel it's unreasonable, and conflicts with the minimum supported version 16 of nest/cli and nestjs. I don't feel comfortable upgrading node version for some objective reasons, so I hope nest/cli can support node v16. Thank you.

image

Minimum reproduction code

npm install -g @nestjs/cli

Expected behavior

Smoothly upgrade to the latest version

Other

No response

LengJunT avatar Apr 02 '24 03:04 LengJunT

Same warning observed, when I use the nest for as sub-app for my express server with node16.x ( usually with private npm repository ) Ideally if we are not using the angular in project, The dependency should not be pulled in node_modules.

dubeyAditya avatar May 11 '24 07:05 dubeyAditya

image

@kamilmysliwiec in order to fix that, we should downgrade @angular-devkit/* to v16

image

It's fair because looking at v17.0.0 changelogs it seems that it was a major bump just because their drop supporting node16. There are couple fixes in v17 as well but I don't think they would impact on @nestjs/cli

Note that Node.js v16 is planned to be End-of-Life on 2023-09-11 so I'd say that in Nestjs v12 we must have drop supporting it.

micalevisk avatar Jul 02 '24 15:07 micalevisk

@dubeyAditya

Ideally if we are not using the angular in project, The dependency should not be pulled in node_modules.

those deps are needed because nestjs CLI uses the Angular Schematics feature. And this is fine. Also, in a production env., you shouldn't be using nestjs CLI so having that dep is not a big deal.

micalevisk avatar Jul 02 '24 15:07 micalevisk