I'm new with ReactJs, when I create-react-app in my D folder, it run successfully, but when I create react app in 'D:\workspace' it showed this screen:
node:fs:1398
handleErrorFromBinding(ctx);
^
Error: EPERM: operation not permitted, mkdir 'first-app'
at Object.mkdirSync (node:fs:1398:3)
at module.exports.makeDirSync (C:\Users\Admin\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\fs-extra\lib\mkdirs\make-dir.js:23:13)
at createApp (C:\Users\Admin\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:257:6)
at C:\Users\Admin\AppData\Local\npm-cache\_npx\c67e74de0542c87c\node_modules\create-react-app\createReactApp.js:223:9
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -4048,
syscall: 'mkdir',
code: 'EPERM',
path: 'first-app'
}
Node.js v18.18.0
I've checked File Explorer but there weren't any files named AppData, Local, and npm, I can go to it by cd command but when I used other command it said the file doesn't exist. Can anyone explain this to me, pls?
Run command line with administrator rights will solve permission error.