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

Specify Node.js without npm --local deprecation bug #26443

Closed
MikeMcC399 opened this issue Apr 6, 2023 · 7 comments
Closed

Specify Node.js without npm --local deprecation bug #26443

MikeMcC399 opened this issue Apr 6, 2023 · 7 comments
Labels
type: enhancement Requested enhancement of existing feature

Comments

@MikeMcC399
Copy link
Contributor

MikeMcC399 commented Apr 6, 2023

What would you like?

I would like to be able to use the version of Node.js specified in .node-version to install yarn without receiving an error message.

Why is this needed?

Executing npm install yarn -g should not produce warnings.

Other

.node-version currently contains 16.16.0.

$ node -v
v16.16.0
$ npm -v
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
8.11.0

$ npm install yarn -g
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

Suggestion

This issue was solved in npm v8.12.1.

So perhaps you could bump to at least Node.js 16.17.0 (includes npm 8.15.0), if not Node.js 16.20.0 (includes npm 8.19.4)?

@emilyrohrbough
Copy link
Member

emilyrohrbough commented Apr 6, 2023

@MikeMcC399 The current node version is 16.16.0 because this is the node version shipped with the version of electron we currently use. When that version bumps, this will bump as well. We care because you can use the system node version or the shipped node version when running Cypress.

This will update when #26246 or #26416 is merged. If we get onto electron@23/electron@24, this will be node 18.12.1.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Apr 6, 2023

@emilyrohrbough

Thank you very much for the explanation! Good to know what the reason behind the setting is and that there is a prospect that Electron 21 will be updated to 23 or 24, especially as Electron 21 is officially coming to its end of life.

https://releases.electronjs.org/release/v24.0.0 is a bit contradictory. At the top it says Node.js 18.14.0 and in the text it lists 18.12.1. Either one would be good though!

Edit: Now consistently showing Node.js 18.14.0 against Electron v24.0.0 on https://releases.electronjs.org/release/v24.0.0.
https://releases.electronjs.org/release/v24.1.2 is currently latest stable.

@nagash77
Copy link
Contributor

nagash77 commented Apr 6, 2023

@MikeMcC399 that electron upgrade is something we are planning as we speak. Hopefully will happen soon.

@nagash77 nagash77 added the type: enhancement Requested enhancement of existing feature label Apr 6, 2023
@MikeMcC399
Copy link
Contributor Author

@nagash77

According to https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline Electron 21 entered end-of-life status on April 4, 2023. Did you come to any decision about migrating to a supported version?

@MikeMcC399
Copy link
Contributor Author

@emilyrohrbough

The current node version is 16.16.0 because this is the node version shipped with the version of electron we currently use. When that version bumps, this will bump as well. We care because you can use the system node version or the shipped node version when running Cypress.

CONTRIBUTING: Requirements says:


Requirements

You must have the following installed on your system to contribute locally:

  • Node.js (See the root .node-version file for minimum version requirements. You can use avn to automatically switch to the right version of Node.js for this repo.)

From your explanation it sounds like that should not be "minimum version requirements" but rather "exact version requirements".

Did I understand this correctly?

@emilyrohrbough
Copy link
Member

@MikeMcC399 Cypress maintains a minimum node requirement that is specified here. For development aligned, we use the same node version shipped with the electron version. If you'd like to update this verbiage, that would be great.

As for migrating to the next Electron version, it's always a time-consuming effort and we are intended to update soon. Cypress typically does not bump minor versions (often) so it reaching EOF only means we lose out on fixes that would be provided in a newer version. We will get updated soon 😄

@MikeMcC399
Copy link
Contributor Author

@emilyrohrbough

Many thanks again for your response. I'm going to close this issue because it is basically tied to the Electron update for which there are already open PRs:

The question about the wording in CONTRIBUTING: Requirements is best followed up through the following and I will look at providing new verbiage there:

@MikeMcC399 MikeMcC399 closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

3 participants