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
[BUG] Cannot read property 'pickAlgorithm' of null #5496
Comments
npm 7 is long EOL. Can you try npm 8 latest? |
Same issue here on |
and on v8.19.1? |
Yep, did
|
Related npm/ssri#27 |
@DetachHead if you need a work around I can confirm my install is now working after adding this patch. |
I have the same error and clearing the cache is not working.
so from the log It's obvious that the error is At Integrity.match at line 273 in /usr/lib/node_modules/npm/node_modules/ssri/lib/index.js , which is due to match (integrity, opts) {
opts = ssriOpts(opts)
const other = parse(integrity, opts)
const algo = other?.pickAlgorithm(opts)
return (
this[algo] &&
other[algo] &&
this[algo].find(hash =>
other[algo].find(otherhash =>
hash.digest === otherhash.digest
)
)
) || false
} Actually this bug happens many times for no specific reason. And there is a thread at stackoverflow from 11 monthes with npm: 7.21.0 and Node: 14.17.4 I'm using node: 16.17.0, npm: 8.19.1 and I face the same problem. |
npm 8.19.2 |
|
I'm having this issue with Node.js v18.11.0 and npm 8.19.2 (also with v16.18.0 and npm 8.19.2), however it sometimes works on npm 8.15.1 with Node.js v16.18.0. I'm having the issue on my CI, so I reproduce it quite often... Removing the only dependency using Anyone else with this issue using |
worked for me! |
We are facing a similar issue installing aws-cdk@latest (resolves to v2.124.0) node v18.13.0 (with npm 8.19.3) - breaks with A colleague has tested with node v18.13.0 (with npm 9.8.1) and it also works as expected. With npm 8.19.3, specifically installing aws-cdk@2.122 works as well. Interestingly, installing v2.122 and THEN v.2.124.0 seems to solve whatever issue there is with installing v2.124 from a 'clean' slate. [30 min later] I was able to reproduce it reliably with the aws-cdk versions, but now it seems to happen sporadically.
--- UPDATE --- |
The article below answered your question well. Pickalgorithm npm error https://www.conteudopertinente.com.br/npm/pickalgorithm-npm-error/ |
re-raising #3374 as it was closed without a proper solution.
for many users this occurs on every
npm install
, meaning we have to runnpm cache clean --force
every time.The text was updated successfully, but these errors were encountered: