Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: build error #5

Open
murtuzaalisurti opened this issue Jul 24, 2022 · 3 comments
Open

[BUG]: build error #5

murtuzaalisurti opened this issue Jul 24, 2022 · 3 comments

Comments

@murtuzaalisurti
Copy link

Code_zIK0163mqc

@matthiasott
Copy link
Owner

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!

@murtuzaalisurti
Copy link
Author

murtuzaalisurti commented Jul 27, 2022

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.

@gsmartagence
Copy link

This workaround fixed the build task for me (Node18/Windows11):
11ty/eleventy-plugin-vite#22 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants