Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting "Cannot read property 'pickAlgorithm' of null" error in react native

I get an error when running npm install. The error is:

npm ERR! Cannot read property 'pickAlgorithm' of null

npm ERR! A complete log of this run can be found in:
npm ERR!    npm-cache\_logs\2021-10-14T08_03_47_266Z-debug.log

I did the following but the error stays:

  1. Deleted node-modules
  2. Deleted the given file
  3. Running npm cache clear --force

Environment:

OS: Windows 10
react native: 0.65.1
Node: 14.17.4
npm: 7.21.0

like image 436
Kiana Kazeminejad Avatar asked Oct 14 '21 08:10

Kiana Kazeminejad


People also ask

What is current NPM version?

7.0.0 • Public • Published 2 months ago. 1 Dependency. 893 Dependents. 14 Versions.


Video Answer


5 Answers

The only thing that helped me was clearing cache:

npm cache clear --force
like image 152
Zimeni Avatar answered Nov 15 '22 09:11

Zimeni


please use following:

npm cache clear --force

npm install

in my case it is working

like image 23
sachin sakhare Avatar answered Nov 15 '22 07:11

sachin sakhare


This works magically

npm cache clear --force
like image 26
Oussa Ber Avatar answered Nov 15 '22 08:11

Oussa Ber


npm cache clear --force

Then npm install would certainly work.

Usually Windows users encounter this problem.

like image 23
Gabriel soft Avatar answered Nov 15 '22 09:11

Gabriel soft


It seems that running

npm cache clear --force

Is what worked and recommended by everyone. Unfortunately, it did not work for me. There were other suggestions to save-dev first. This also did not work for me.

What I did in order to overcome this issue myself, was narrowing my package.json dependencies. I removed all of them, and kept returning them incrementally until I found the dependency that was causing the issue. I updated the dependency version, and this was what I needed to overcome this issue.

like image 24
orabis Avatar answered Nov 15 '22 07:11

orabis