I'm trying to use create-react-app but I got this error :
Error: EPERM: operation not permitted, mkdir '/dev/dev-app'
I specify that I'm on MacOS and I know that there are a lot of similar questions but they are on windows...
What I've tried :
- Give permissions to npm with
sudo chown -R $(whoami) /dev/but I got the following errorchown: /dev//fd/4: Bad file descriptor npm cache clean --force- I've updated create-react-app (
sudo npm update -g create-react-app)
Here the complete error I get :
node:fs:1324
handleErrorFromBinding(ctx);
^
Error: EPERM: operation not permitted, mkdir '/dev/dev-app'
at Object.mkdirSync (node:fs:1324:3)
at Object.module.exports.makeDirSync (/usr/local/lib/node_modules/create-react-app/node_modules/fs-extra/lib/mkdirs/make-dir.js:101:15)
at createApp (/usr/local/lib/node_modules/create-react-app/createReactApp.js:255:6)
at /usr/local/lib/node_modules/create-react-app/createReactApp.js:226:9
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
errno: -1,
syscall: 'mkdir',
code: 'EPERM',
path: '/dev/dev-app'
}
Thank you in advance for your answers :)