I don’t know why I have so many issues when I tried to install Mongodb.
I wanted to setup a project with Payload. I’m stuck when I want to connect my database mongodb. I tried to link directly the database using the string of connection in the env. file. But still the issue remains and I have an error telling me than MongoDB can’t connect. Everything is settled on mongodb (I create the database and users).
this is the code I have :
npm install [email protected]
npm error code EPERM
npm error syscall mkdir
npm error path C:UsersMilanode_modules.corepack-2p9oARN1
npm error errno -4048
npm error Error: EPERM: operation not permitted, mkdir 'C:UsersMilanode_modules.corepack-2p9oARN1'
npm error at async Object.mkdir (node:internal/fs/promises:858:10)
npm error at async moveFile (C:UsersMilanode_modulesnpmnode_modules@npmclifslibmove-file.js:27:3)
npm error at async Promise.all (index 0)
npm error at async moveFile (C:UsersMilanode_modulesnpmnode_modules@npmclifslibmove-file.js:36:9)
npm error at async Promise.allSettled (index 0)
npm error at async [reifyPackages] (C:UsersMilanode_modulesnpmnode_modules@npmcliarboristlibarboristreify.js:325:11)
npm error at async Arborist.reify (C:UsersMilanode_modulesnpmnode_modules@npmcliarboristlibarboristreify.js:142:5)
npm error at async Install.exec (C:UsersMilanode_modulesnpmlibcommandsinstall.js:150:5)
npm error at async Npm.exec (C:UsersMilanode_modulesnpmlibnpm.js:207:9)
npm error at async module.exports (C:UsersMilanode_modulesnpmlibclientry.js:74:5) {
npm error errno: -4048,
npm error code: 'EPERM',
npm error syscall: 'mkdir',
npm error path: 'C:\Users\Mila\node_modules\.corepack-2p9oARN1'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: C:UsersMilaAppDataLocalnpm-cache_logs2024-09-25T17_22_42_767Z-debug-0.log
PS C:UsersMilaDesktopPrograms ProjectPayloadEcom>
Have you got any suggestion, please ?
[1]: https://i.sstatic.net/BhJ3ICzu.png
user27470122 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1