i try to install jest by local or global with npm but it does not install
my npm version is 7.5.2 and my node version is 12.22.5 also i have ubuntu
and i try this commands :
npm i -D jest
npm i -g jest
npm i jest
but jest dont installed
this is the error : alireza@SUCCESS:~/Desktop/test$ sudo npm i -D jest [sudo] password for alireza: npm ERR! code FETCH_ERROR npm ERR! errno FETCH_ERROR npm ERR! invalid json response body at https://registry.npmjs.org/@jest%2ftransform reason: Unexpected end of JSON input
npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2022-02-14T12_19_47_677Z-debug.log
Sometimes this error is related to an invalid cache so my first suggestions is to run:
npm cache clean --force.
Let me know if it works.