npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

Viewed 22619

iam getting below error with npm while creating react app

npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\Nagamanickam\AppData\Local\npm-cache_logs\2021-11-18T12_01_45_525Z-debug.log

6 Answers

my npm version is 8.1.4 and i solve this problem by running :

npm cache clear --force

I resolved it by deleting node_modules and package-lock.json and run npm install again.

Probably it's a project that works with Yarn and not NPM. Try Yarn instead of NPM.

yarn install

and then you can do

yarn start

or

npm start

Just run these 2 commands :

npm cache clear --force
npm install

In my case the file .npmrc was corrupt. After deleting it everything worked.

I was getting the same error, but I was able to resolve it by the below described method:

Go to folder -> Local > npm-cache and delete all contents of the npm-cache. try again with npm command, it should work now.

Related