This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3k
Fix uninstall leaving nested modules directories with .bin #11181
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hmm... we may want to hoist and name that error handler to a function declaration, and @iarna should review this because she's the expert on the installer, but this looks good to me aside from those concerns. Thanks for including a test! |
Previously, installed packages that contained node_modules with a .bin directory woudn't get cleaned up correctly. After unbuild of that particular package, npm would complain with ENOENT errors because the package directory would be empty (without package.json), as it only contains the leftover `node_modules/.bin` directory.
chrisirhc
force-pushed
the
fix-bin-leftover
branch
from
January 18, 2016 05:34
2fa1af9
to
6de468f
Compare
Sounds good. I updated the PR to use a function declaration, cleaned up the commits and cleaned up the duplicate |
iarna
pushed a commit
that referenced
this pull request
Jan 20, 2016
Previously, installed packages that contained node_modules with a .bin directory woudn't get cleaned up correctly. After unbuild of that particular package, npm would complain with ENOENT errors because the package directory would be empty (without package.json), as it only contains the leftover `node_modules/.bin` directory. PR-URL: #11181 Credit: @chrisirhc Reviewed-By: @othiym23 Fixes: #10887 Fixes: #10938
iarna
pushed a commit
that referenced
this pull request
Jan 21, 2016
Previously, installed packages that contained node_modules with a .bin directory woudn't get cleaned up correctly. After unbuild of that particular package, npm would complain with ENOENT errors because the package directory would be empty (without package.json), as it only contains the leftover `node_modules/.bin` directory. PR-URL: #11181 Credit: @chrisirhc Reviewed-By: @othiym23 Fixes: #10887 Fixes: #10938
This was merged to 3.5.5! =) |
Hooray! 😄 |
This was referenced Jan 31, 2016
This was referenced Feb 7, 2016
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #10887 #10938
I haven't added a test for the main modules'
node_module/.bin
, this removesnode_module/*/node_modules/.bin
so that empty modules can be removed.