-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Can't clone and initialize brave-browser repo with NPM >= 8 #19993
Comments
For the sake of completeness, this is what you should see when running
|
mariospr
added a commit
that referenced
this issue
Dec 8, 2021
From NPM >=6 and as explained in RFC 21[1], npm is removing the npm_config_* and npm_package_* environment variables from the context of lifecycle scripts and so, while some of them such as the npm_package_config_* ones will still work on NPM 7, we need to adapt to this change or it won't be able to setup the repository from NPM 8 on. This change does a small change to make sure that we work on every possible situation, relying on those environment variables if still using NPM <= 7, or simply reading the package.json file as a dictionary when using NPM >= 8. [1] https://github.com/npm/rfcs/blob/main/implemented/0021-reduce-lifecycle-script-environment.md Resolves #19993
25 tasks
mariospr
added a commit
that referenced
this issue
Dec 8, 2021
From NPM >=6 and as explained in RFC 21[1], npm is removing the npm_config_* and npm_package_* environment variables from the context of lifecycle scripts and so, while some of them such as the npm_package_config_* ones will still work on NPM 7, we need to adapt to this change or it won't be able to setup the repository from NPM 8 on. This change does a small change to make sure that we work on every possible situation, relying on those environment variables if still using NPM <= 7, or simply reading the package.json file as a dictionary when using NPM >= 8. [1] https://github.com/npm/rfcs/blob/main/implemented/0021-reduce-lifecycle-script-environment.md Resolves #19993
mariospr
added a commit
that referenced
this issue
Dec 9, 2021
Fix npm run init to work when using NPM >= 8
mariospr
added a commit
that referenced
this issue
Jan 11, 2022
Fix npm run init to work when using NPM >= 8
25 tasks
kjozwiak
added a commit
that referenced
this issue
Jan 11, 2022
…ing-NPM-8 Merge pull request #19994 from /issues/19993
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
If you have NPM version 8 or greater, chances are that you'll hit an error like this when trying to initialize the repository for the first time, following the instructions from the wiki:
I've done some investigation and, after finding a couple of bugs related to that, it seems that this intented behaviour from NPM >=6, as explained in RFC 21: https://github.com/npm/rfcs/blob/main/implemented/0021-reduce-lifecycle-script-environment.md
Turns out also that this is not yet an issue on NPM 7 because
npm_package_config_*
environment variables are still available for transitional purposes, but in NPM 8 (or at least from 8.1.0, the one I have) those variables are no longer availables, causing the error above.Steps to Reproduce
Actual result:
The
npm run init
process fails as described above.Expected result:
The
npm run init
process succeeds and brave-browser, chromium and brave-core repositories are properly set up.Reproduces how often:
Always
The text was updated successfully, but these errors were encountered: