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

The node_modules deletion follows symbolic links #14138

Closed
knownasred opened this issue Jul 1, 2022 · 7 comments · Fixed by #14259
Closed

The node_modules deletion follows symbolic links #14138

knownasred opened this issue Jul 1, 2022 · 7 comments · Fixed by #14259

Comments

@knownasred
Copy link

Describe the bug

When upgrading the Vaadin version (this happened while upgrading from 23.0.x to 23.1.3), the node_modules directory is deleted by Vaadin (I did not find the source of the deletion yet, could be caused by the gradle plugin, or vaadin dev tools), but the deletion follows symbolic links, that deletes the source code of local packages.

Expected-behavior

The deletion does not follow symbolic links, and instead removes the symbolic link itself

Reproduction

  1. Create a JS package in the source code. For this example, the package is in $PROJECT_DIR/package/npm-package.
  2. Reference the package in the package.json file of the vaadin project, with the following format:
{
    "dependencies": {
        "npm-package": "file:./package/npm-package",
    }
}
  1. Update your vaadin version
  2. See your source files disappear in the $PROJECT_DIR/package/npm-package directory

System Info

  • OS: Windows 10 (21H2)
  • Java Version: 17.0.2 (OpenJDK)
  • Vaadin version: 23.0.x / 23.1.3
@knownasred knownasred added the bug label Jul 1, 2022
@vaadin-bot
Copy link
Collaborator

Thanks for using Vaadin! We appreciate your help and we’ll take care of this as soon as possible.

@knoobie
Copy link
Contributor

knoobie commented Jul 1, 2022

This PR could be related #12822 as starting point

@taefi taefi transferred this issue from vaadin/platform Jul 4, 2022
@mshabarov mshabarov added the BFP Bugfix priority, also known as Warranty label Jul 25, 2022
@caalador
Copy link
Contributor

caalador commented Aug 1, 2022

This is a known issue on windows that the symbolic link is followed see #11177
Specially the comment #11177 (comment)

@caalador caalador self-assigned this Aug 3, 2022
caalador added a commit that referenced this issue Aug 3, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
mshabarov pushed a commit that referenced this issue Aug 8, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
vaadin-bot pushed a commit that referenced this issue Aug 8, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
vaadin-bot pushed a commit that referenced this issue Aug 8, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
mshabarov pushed a commit that referenced this issue Aug 8, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177

Co-authored-by: caalador <[email protected]>
caalador added a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
# Conflicts:
#	flow-server/src/test/java/com/vaadin/flow/server/frontend/FrontendUtilsTest.java
caalador added a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
taefi pushed a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
taefi pushed a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
taefi pushed a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177

Co-authored-by: caalador <[email protected]>
vaadin-bot pushed a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
mcollovati pushed a commit that referenced this issue Aug 9, 2022
Fix removal of node_modules so that
symlink and Windows junction directory
contents are not deleted also.

Fixes #14138
Closes #11177
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.2.0.beta1 and is also targeting the upcoming stable 23.2.0 version.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 14.8.16.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 22.0.21.

@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 23.0.15.

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

Successfully merging a pull request may close this issue.

5 participants