'npm ERR! code EPERM npm ERR! syscall mkdir

I ran this in vscode

npm install eslint-plugin-react-hooks --save-dev

After running

npm ERR! code EPERM
npm ERR! syscall mkdir
npm ERR! path D:\Users\AOM\node_modules\.corepack-zcmWVMs

Please help me

enter image description here



Solution 1:[1]

I am not sure, since there is not much description here, but the problem can be solved by creating a directory in drive other than "C" so try that or just don't try to run above command in existing folders provided by Windows like Desktop/Download/Documents/Pictures/Users etc If this does not work please explain what you are trying to do here

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 jainChetan81