-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
pnpm ignoring detect_chromedriver_version flag in .npmrc #4927
Comments
I did not know that npm puts setting from |
I think yarn@1 implements it. With yarn@1, we use yarn-path setting to execute bash script that intercepts yarn commands. It does |
@zkochan do you think its possible to add a feature to define settings in .npmrc or modify custom hook |
I don't think |
What's funny is that I'm on a two week RV trip with my family and doing a lot of driving - which means lots of time to think. I've been thinking about .env support quite a lot. @zkochan when I get back after July 9th I'll probably pick that up. |
But if I read In this case, I believe we want this in the repo. I think we can add a new field to {
"pnpm": {
"envVariables": {
"detect_chromedriver_version": "true"
}
}
} |
I like envVariables idea |
cc @pnpm/collaborators let me know what you think about this feature. |
I Approve of this. But at the same time, we should be consistent with the behavior of npm. And npm will auto add prefix:
|
good catch @BlackHole1. Thank you all for looking in to this |
+1 to @BlackHole1's comment. @sbonasu The |
@gluxon no, postinstall is not installing correct chromedriver version matching chrome version. Its installing the version specified in package.json |
I've checked, Maybe you have this package cached and the cache was written with a different setting. Try to add |
side-effects-cache=false seems to have done the trick. Thank you |
ok, this is solved. I created a new issue to try to fix this #5002 |
pnpm version: 7.3.0
Code to reproduce the issue:
https://www.npmjs.com/package/chromedriver
.npmrc file contents
ignore-scripts = true
detect_chromedriver_version=true
Expected behavior:
browser version is 95.0.4638.54
When I check chromedriver version in node_modules, its not matching chrome browser version
node_modules/.pnpm/node_modules/.bin/chromedriver --version
ChromeDriver 101.0.4951.41 (93c720db8323b3ec10d056025ab95c23a31997c9-refs/branch-heads/4951@{#904})
Actual behavior:
chromedriver version should match browser version.
If the current implementation doesn't support this setup. Is there a way to pass
DETECT_CHROMEDRIVER_VERSION=true
environment variable withpnpm install
or use .pnpmfile.cjs?I have tried doing this with .pnpmfile.cjs afterAllResolved hook but it doesn't run when
Lockfile is up-to-date
. Deleting lock file is not an option since it introduces version mismatches(importing from yarn.lock).Additional information:
node -v
prints: v16.15.1The text was updated successfully, but these errors were encountered: