Open murtuzaalisurti opened 2 years ago
Hi @murtuzaalisurti! Thanks for opening this issue! 😄
When did you experience this error? When running npm run build
? I can’t reproduce it, unfortunately, but it seems to be related to file permissions in your working folder. The build fails because it is not possible to rename the temporary folder generated by Eleventy into the final output folder for Vite. Is your current npm user allowed to rename files/folders? Ideally, you don’t run npm scripts as admin but your user still needs to have the necessary rights. You could also try to delete both the _site
and the temporary .11ty-vite
folder (which normally should be renamed and then deleted but maybe something went wrong with a build) and try again.
And, when I searched online for your EPERM: operation not permitted
error, I also stumbled upon this possible solution – in case you are using VS Code…? https://stackoverflow.com/questions/39293636/npm-err-error-eperm-operation-not-permitted-rename
Let me know if you find a solution or otherwise are able to provide me with a few more details so I can try to reproduce it myself. Good luck and all the best!
Running as an administrator also didn't work. I tried the above solution but didn't help. Also, running different node and npm versions did nothing.
This workaround fixed the build task for me (Node18/Windows11): https://github.com/11ty/eleventy-plugin-vite/issues/22#issuecomment-1539443517