ERR! Unexpected end of JSON input while parsing near '...5","optimist":"~0.6.1'

Hi i have installed node js and my node version is v12.16.1

after that when i enter command sudo npm i -g expo-cli i got this error

ERR! Unexpected end of JSON input while parsing near '…5",“optimist”:"~0.6.1’

after some research i found that if i run clean cache command npm cache clean --force

this issue will be resolved

but the main problem is i am working on a react project in my system, if u run this npm cache clean --force command, will this command disturb my react project working or not

kindly help me so that my react project work smooth and i can install react native as well

You might try running npm cache verify as recommended here: https://docs.npmjs.com/cli/v7/commands/npm-cache
Depending on your version of npm, note that the cache is “self-healing and resistant to data corruption issues”. Also, the npm team states “it should never be necessary to clear the cache for any reason other than reclaiming disk space, thus why clean now requires --force to run.”