-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
fs.symlink can’t create directory symlinks on Windows #18518
Comments
Can't reproduce on master. |
For an idea of the context of this: ghost-cli creates a directory symlink as part of |
The libuv upgrade will make its way into node 8 eventually. Since there is nothing to do but wait I'll go ahead and close this out. The relevant libuv PR: libuv/libuv#1706 |
This is still a problem. Any update? |
@livingstonef I now have 8.11.1, and it’s fixed there. If you have an older version of Node, try upgrading. If it’s the same or newer, ensure your Windows installation is in Developer Mode, and then please verify that my “simplest example to demonstrate the issue” does in fact not work for you; if it does work, then you probably have a different issue. |
|
@flotwig For historical and security reasons, it requires either admin privileges, or for the machine to be in developer mode and the appropriate flag set in the API call (and that flag was what was missing). But yeah, this was fixed over a year ago now. |
Yeah, we're still using Node 8.9.3 (though upgrading soon!) FWIW, I actually needed to pass |
Switching to type=junction seems to fix the issue. Here is a related ticket on node: nodejs/node#18518
There are still some problems. Folders are created correctly, but the files are also recognized as folders and the soft links created do not work. |
Still true in node v16.17.0 |
This bug is still occurring on Node v18 LTS. Has this been fixed by a higher niode version? If not, this issue either needs to be reopened or referenced in a new issue. |
@IRod22 v18.x never had this issue. I suspect you're misunderstanding the discussion here. |
@bnoordhuis I am investigating a bug for imba/imba#768 where Node throws a |
Here's my node version: > node -v
v18.12.1 |
v18.16.0
windows 11
|
Using
fs.symlinkSync( x, y, 'dir' )
to create a directory symlink is failing (EPERM: operation not permitted), whilemklink /d
is able to make the symlink.Simplest example to demonstrate the issue:
File symlinks are fine; it’s only directory symlinks that are failing. It doesn’t matter whether the target path exists or not, it fails with the same EPERM error.
Meanwhile,
The text was updated successfully, but these errors were encountered: