-
-
Notifications
You must be signed in to change notification settings - Fork 252
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
rimraf node_modules delete all files #259
Comments
That definitely shouldn't happen. What command are you running? |
Something like this I suspect
It removes the contents of the folders that contain a node_modules folder as well |
Yeah, but have you tested that? Because that is not what I'm seeing. #!/bin/bash
rm -rf test-gh-259
mkdir test-gh-259
cd test-gh-259
mkdir -p node_modules/{a,b,c}
touch node_modules/{a,b,c}/{index.js,package.json}
mkdir -p packages/{x,y,z}/node_modules/{i,j,k}
touch packages/{x,y,z}/{node_modules/{i,j,k}/,}{index.js,package.json}
ln -s ../packages/x node_modules/x
ln -s ../packages/y node_modules/y
ln -s ../packages/z node_modules/z
ln -s ../x packages/y/node_modules/x
ln -s ../x packages/z/node_modules/x
ln -s ../y packages/x/node_modules/y
ln -s ../y packages/z/node_modules/y
ln -s ../z packages/x/node_modules/z
ln -s ../z packages/y/node_modules/z
tree
npx -y rimraf@latest --glob "node_modules" "packages/*/node_modules"
tree Output:
|
It's just deleting the node_modules folders, not the package contents themselves. |
Replacing the rimraf command with |
Will re-open if reproduction case is provided. |
ypLive-Visual-Studio-Code-2023-0.mp4You can see this video. All the files in liveRoom2 have been deleted. The file change area on the left shows the deleted 3k+files |
The video is not loading. Please share what command you ran. Just comment as text, not a video or screenshot. |
He's on windows and running rimraf node_modules It is deleting ALL the files in a folder further down the tree that happens to have a node_modules folder. |
Ah, I think I see what's going on. Symlinks aren't being handled properly in the windows version. Will fix shortly. |
Fixed on 4.3.1. It could also have affected posix systems, so this is potentially serious. Thanks for reporting it. |
* log to disk * remove some unwraps * panicless * some p2p error handling * clippy moment * Fix `<ErrorBoundary />` * open logs button * 39 to 0 * fix types * update deps and comment out broken tests * clippy * more clippy * upgrade rimraf - isaacs/rimraf#259 * regen broken lockfile * update `notify` and update `commands.ts` * more clippy (pls work) * allow deprecated for p2p (hopefully temporary) * a * upgrade deps for p2p * do betterer * do it correctly * remove unused import * improve core startup error + bc keypair --------- Co-authored-by: Utku Bakir <[email protected]> Co-authored-by: brxken128 <[email protected]>
I have a monorepo warehouse. When I delete node at the outermost layer_ Modules folder, the files in each folder under packages are also deleted
The text was updated successfully, but these errors were encountered: