Skip to content

Using the .npmrc suggestion for detect_chromedriver_version warns in npm 11.2.0 #535

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

Open
danielhjacobs opened this issue Mar 29, 2025 · 1 comment

Comments

@danielhjacobs
Copy link

Doing the suggestion from https://www.npmjs.com/package/chromedriver#user-content-detect-chromedriver-version to put detect_chromedriver_version in .npmrc warns with npm 11.2.0 as described in npm/cli#8153.

npm warn Unknown env config "detect-chromedriver-version". This will stop working in the next major version of npm.
npm warn Unknown project config "detect_chromedriver_version". This will stop working in the next major version of npm.
@giggio
Copy link
Owner

giggio commented Apr 3, 2025

By reading that thread it seems that this will only be removed in Npm version 12, so I believe we should keep the default behavior until it is out, and add the new one, as recommended by this comment, made by the Team:

npm/cli#8153 (comment)

Which is to use package.json#config.

They cite in an earlier comment to use it like this, in package.json (listing all config values):

{
  "name": "mypkg",
  "config": {
    "detect_chromedriver_version": true,
    "include_chromium": true,
    "chromedriver_force_download": true,
    "chromedriver_cdnurl": "https://npmmirror.com/metadata",
    "chromedriver_cdnbinariesurl": "https://npmmirror.com/binaries",
    "chromedriver_legacy_cdnurl": "https://npmmirror.com/mirrors/chromedriver",
    "chromedriver_filepath": "/path/to/chromedriver_mac64.zip",
    "chromedriver_skip_download": true,
    "chromedriver_version": "LATEST"
  }
}

So, let's do this.

If anyone wants to send a PR to use the new method while keeping the old one around, and updating the readme, I'll take it. Otherwise I'll look into it in the future, but before npm v12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants