You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, it would require some work to generate a .node-version file with specific version. We first need to find latest version from the Node.js version semver: ^18.13.0 || >=20.9.0. We could grab something from setup-node GitHub Action code. Like getNodeJsVersions to get available versions and evaluateVersions to find the candidates
We could use a library like node-resolve-versions but it's not an official one, so maintenance risk there. Fortunately that one has activity from months ago.
Or we could just place the semver in the .node-version file. .node-version usage repo doesn't indicate if that is supported in many Node.js version managers. However, checked and it is actually supported in setup-node GitHub Action by reading code of it. n (which I use locally) does not though:
found : /Users/davidlj95/Code/git/davidlj95/ngx/.node-version
read : ^18.13.0 || >=20.9.0
Error: invalid version 'auto'
We would have to see anyway also how to re-configure CI/CD pipeline to switch to that Node version after using another Node.js to run the script to create the sample app. Maybe is as easy as calling setup-node again.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Currently, all E2E generated apps run under node version specified in
.node-version
of the repoThis triggers warnings when running Angular CLI compilation commands (y con razón)
We should somehow run the E2E apps with proper node version.
Fortunately, that info can be now retrieved by looking at
engines.node
inpackage.json
of@angular/core
packageHowever, it would require some work to generate a
.node-version
file with specific version. We first need to find latest version from the Node.js version semver:^18.13.0 || >=20.9.0
. We could grab something fromsetup-node
GitHub Action code. LikegetNodeJsVersions
to get available versions andevaluateVersions
to find the candidatesWe could use a library like
node-resolve-versions
but it's not an official one, so maintenance risk there. Fortunately that one has activity from months ago.Or we could just place the semver in the
.node-version
file..node-version
usage repo doesn't indicate if that is supported in many Node.js version managers. However, checked and it is actually supported insetup-node
GitHub Action by reading code of it.n
(which I use locally) does not though:We would have to see anyway also how to re-configure CI/CD pipeline to switch to that Node version after using another Node.js to run the script to create the sample app. Maybe is as easy as calling
setup-node
again.Beta Was this translation helpful? Give feedback.
All reactions