-
Notifications
You must be signed in to change notification settings - Fork 311
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
Proposed fix for #500 and #429 #501
Conversation
Resolves relative path `'..'` and possible mixed casing of `C:\` vs `c:\` on Windows due to `__dirname`.
Travis CI build failed due to IE timeout (unrelated to this fix) |
Closing PR in hopes of triggering a rebuild with Travis CI. |
Reopen pull request to trigger Travis CI. |
Sigh... another unrelated Travis CI error. Please accept the PR! |
Thanks for the patch, do you have an upstream bug report about this problem? It seems wrong that |
I wish I did ... but I think they've rejected all previous attempts to fix related issues. Instead it remains not well documented but a "generally accepted practice" when performing string comparison on two paths especially if they might exist on a case-insensitive file system (ie. NTFS/FAT on Windows). It has some pretty scary side effects when loading modules using One of the better tickets: require() loads same module multiple times if case is different Ticket that specifically outlines this issue (about half way down) when loading modules: |
Thanks for the pointers. I see the commit that was added to Node.js that broke this between 0.10 and 0.12. (Why would you ever normalise drive letters to lowercase? When are drive letters ever represented lowercase anywhere ever? Uppercase drive letters date back to at least CP/M in the 1970s. How cou… I jus… whatever. ) I’m surprised this isn’t more of an issue more frequently. |
That about sums it up! I suppose nodejs is less frequently run on Windows and those of us who have been burned by this bug just instinctively normalize ... at least it hasn't reached the point of the double claw hammer. ;) |
So sorry, can you send a test that causes this to actually happen reliably outside of the context of npm 3? I am trying to get I see an installation failure when using npm 3, but only npm 3. |
OK, so the issue here is:
So, you need to run as admin when installing with npm 3 on Windows. The fixdeps command can also optionally be updated to perform copies when a symlink fails with an EPERM error, if anyone cares to make that modification. |
Or actually junction links seem to work fine without any permissions changes, so maybe there is a way to have fixdeps do that instead. |
Very good! Upon further testing you're absolutely right -- it seems they did fix that bug! |
Resolves relative path
'..'
and possible mixed casing ofC:\
vsc:\
on Windows due to__dirname
.