Can't reinstall node on Windows 10

Viewed 19

I was getting an error while working with Node.

Tried to do npm i for a project code downloaded from GitHub. Got this error.

C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\fs\lib\mkdir\index.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:360:18) at wrapSafe (node:internal/modules/cjs/loader:1055:15) at Module._compile (node:internal/modules/cjs/loader:1090:27) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1180:10) at Module.load (node:internal/modules/cjs/loader:1004:32) at Function.Module._load (node:internal/modules/cjs/loader:839:12) at Module.require (node:internal/modules/cjs/loader:1028:19) at require (node:internal/modules/cjs/helpers:102:18) at Object. (C:\Program Files\nodejs\node_modules\npm\node_modules@npmcli\fs\lib\index.js:5:10) + FullyQualifiedErrorId : CommandNotFoundException

Deleted NodeJS from Add/Delete Programs. Tried to reinstall by downloading from official website. Got this error.

Error while writing to file: C:\Program Files\nodejs\node_modules\npm\node_modules\is-core-module\package.json. Verify that you have access to that directory.

I'm stuck. Please help.

1 Answers
Related