'All React app not running on my pc using npm start. Cannot resolve the error

'npm' has stopped working and giving the error attached below. Also while running any react app on my laptop using ~npm start I am getting the same error. Please help.

PS C:\Users\LENOVO\Desktop\react\portfolio> npm start
C:\Program Files\nodejs\node_modules\npm\node_modules\agentkeepalive\lib\https_agent.js:1
$→��m��mo�L�D��;�%g�?w��ŷ↓�▬��ovH0��a�5��*�ؒ��l͛�S�iy☺�r�O7����%L]��%��∟�hk
 ^

SyntaxError: Invalid or unexpected token
    at Object.compileFunction (node:vm:352:18)
    at wrapSafe (node:internal/modules/cjs/loader:1031:15)
    at Module._compile (node:internal/modules/cjs/loader:1065:27)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\agentkeepalive\index.js:4:29)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)


Solution 1:[1]

For some reason, the npm\node_modules\agentkeepalive\lib\https_agent.js file used by Node's bundled npm has been corrupted. (Your hard drive may be going bad – might want to keep an eye on it, or it may be something else.)

The easiest way to fix it, since you can't run npm to fix npm, should be to just reinstall Node.js (or if there's a Repair option for it in Windows' Settings, you could try that).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AKX