i have problems using node.js to install or create thing

Viewed 609

i get this whenever i try to install sass with npm npm install -g sass


npm WARN log failed to remove log file C:/Users/MaMa~Nora~0U0/AppData/Roaming/npm-cache/_logs/2021-06-03T22_51_22_690Z-debug.log
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/sass failed, reason: connect ETIMEDOUT 104.16.24.35:443
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR!  FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'
npm ERR!     at C:\Program Files\nodejs\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15 {
npm ERR!   code: 'EPERM',
npm ERR!   errno: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'C:\\Users\\MaMa~Nora~0U0\\AppData\\Roaming\\npm-cache\\_cacache\\tmp\\644a6159',
npm ERR!   type: 'system',
npm ERR!   requiredBy: 'node_modules/sass/node_modules/anymatch'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

actully i can't also use the command npx create-react-app ...

is node not compaitable with my laptop or my internet is the reson of the failer? i have just wanted to learn node.js and now i have been solving error after error and couldn't make any progress please help me

1 Answers

In the error log:

errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npmjs.org/picomatch: EPERM: operation not permitted, open 'C:\Users\MaMa~Nora~0U0\AppData\Roaming\npm-cache\_cacache\tmp\644a6159'

EPERM is the code for the permission issue. You can try running the command line as administrator to have the appropriate privilege, then rerun npm install -g sass

Related