Hi I am running npm i fs and getting the below error .I am new to the node js please help. I am running the command as administrator and windows security is also off.Operating system is win 11
error errno -4048
40 error [Error: EPERM: operation not permitted, mkdir 'D:\'] {
40 error errno: -4048,
40 error code: 'EPERM',
40 error syscall: 'mkdir',
40 error path: 'D:\\'
40 error }
41 error
41 error The operation was rejected by your operating system.
41 error It's possible that the file was already in use (by a text
editor or antivirus),
41 error or that you lack permissions to access it.
41 error
41 error If you believe this might be a permissions issue, please
double-check the
41 error permissions of the file and its containing directories, or
try running
41 error the command again as root/Administrator.
CodePudding user response:
You probably don't have rights to write to folder D:\
, as stated in the error message. Please confirm your user can create a folder in that directory.
Another test would be to move your project to your user's folder, then issuing a npm install
from there.
CodePudding user response:
I created a directory with name node_modules inside the project folder and now it is working.