-
Notifications
You must be signed in to change notification settings - Fork 161
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
vaadin:clean-frontend fails with "Couldn't remove [...]\node_modules directory" on Windows #12655
Comments
The NoSuchFileException suggests that dirs are being deleted as the webpack/pnpm terminates, and this happens in parallel with vaadin:dance. Perhaps in this case Vaadin plugin should retry |
I have a vague feeling that this might be some timing / process forking issue, but I don't have any facts to back that up. |
To be clear the The second exception is not from the clean task, but from npm installation task that sees that there is something that needs node_modules to be removed which then fails as there is (according to the stacktrace) a file marked that doesn't exist and this can not be removed and windows throws an exception. |
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Update exception for failing to remove node_modules folder. Closes #12655
Description of the bug
Running the
vaadin:clean-frontend
goal sometimes fails with an exception (instead of with a nice error messageFailed to remove .../node_modules
. Please remove it manually.) which seems to be related to not being able to delete
\node_modules`.Occasionally this error also occurs after running
vaadin:clean-frontend
and starting the Spring Boot application again (can't confirm whether node_modules was properly deleted in this case or not).The exception stack trace looks as follows:
Expected behavior
If deleting node_modules fails, it should give a graceful error message.
Minimal reproducible example
https://github.com/OlliTietavainenVaadin/v22-flow-start
mvn spring-boot:run
, wait for the front-end build to finishmvn vaadin:dance
Repeat the process if necessary.
The results may be a bit different depending on if these are run from the IDE or from command line (used WSL for command line for testing which gave me the exception)
Versions
The text was updated successfully, but these errors were encountered: