node-windows
node-windows copied to clipboard
Unlinking exe file fails on installation
I just noticed that the service uninstallation has trouble unlinking the exe file on my machine. This may be user error, in which case I apologize.
fs.js:760
return binding.unlink(pathModule._makeLong(path));
^
Error: EPERM, operation not permitted 'C:\Users\pschuegr\Documents\GitHub\wt\package\daemon\wt.exe'
at Object.fs.unlinkSync (fs.js:760:18)
at rm (C:\Users\pschuegr\AppData\Roaming\npm\node_modules\node-windows\lib\daemon.js:458:22)
at C:\Users\pschuegr\AppData\Roaming\npm\node_modules\node-windows\lib\daemon.js:471:15
at ChildProcess.exithandler (child_process.js:635:7)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
npm ERR! weird error 8
npm ERR! not ok code 0
Which version of node are you running? I don't remember how long ago it was, but there was a bug in the core node unlink
command which was resolved in newer versions. Alternatively, this could be an issue of not running with admin/elevated privileges.
I'm on 0.10.24. Is it necessary to run the uninstallation with admin privileges? It still seems to uninstall, just doesn't delete the exe file.
You should be fine on the version.
Depending on where you installed the script, it may require admin privileges. Anything in the C:\Program Files
directory requires admin privileges to add or remove... that's just Windows.
Hmm, that's not it then. I'll see if I can figure anything else out.
Ah, I just looked at your output again and noticed you're in the Users
directory... assuming that's your user directory. If you're running the uninstall under your own account, then it should remove the file.
The only other thing I can think of is something is still hanging onto that file. It's possible the uninstall itself is hanging on. Sometimes running the uninstall twice fixes the issue. Not ideal... but if it works I know what the problem is.
hi i have the same problem? can anyone please give detail resolution to this issue.
sorry, I haven't had time to dig into this further yet. On Mar 5, 2014 11:00 PM, "ravik000" [email protected] wrote:
hi i have the same problem? can anyone please give detail resolution to this issue.
Reply to this email directly or view it on GitHubhttps://github.com/coreybutler/node-windows/issues/48#issuecomment-36829998 .
i think this may be the same as https://github.com/coreybutler/node-windows/issues/38
Did you stop the service before uninstalling? I had a similor problem, it was resolved by adding