Skip to content
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

update command failed on EPERM #82

Open
amiram opened this issue Feb 15, 2017 · 5 comments
Open

update command failed on EPERM #82

amiram opened this issue Feb 15, 2017 · 5 comments

Comments

@amiram
Copy link

amiram commented Feb 15, 2017

I'm using sicksync on windows with mingw. I installed sicksync globally using node 6.9.5 installed with nvm-windows.
When I run the update command I see a successful update of the remote machine but then I get an error about my local machine. After that, sicksync is not installed anymore. Error is:

[Function: getHostname] '\u001b[31mUpdate failed! Please run manually\u001b[39m' { Error: Command failed: npm i -g sicksync
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.0.0 (node_modules\sicksync\node_modules\chokidar\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.0.17: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm ERR! Windows_NT 10.0.14393
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "i" "-g" "sicksync"
npm ERR! node v6.9.4
npm ERR! npm v3.10.10
npm ERR! path C:\Program Files\nodejs\sicksync
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open

npm ERR! Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\sicksync'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, open 'C:\Program Files\nodejs\sicksync'
npm ERR! at Error (native)
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'open',
npm ERR! path: 'C:\Program Files\nodejs\sicksync' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR! xxx\npm-debug.log

at ChildProcess.exithandler (child_process.js:206:12)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:877:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

killed: false,
code: 4294963248,
signal: null,
cmd: 'npm i -g sicksync' }

@joelgriffith
Copy link
Contributor

That's very interesting, thanks for the issue. EPERM has to do with file-permissions issues, so it's likely the update command isn't doing something right.

I'm not terribly familiar with running node packages on windows. Could you elaborate on how you originally installed? The commands you ran and such. I'm guess that the update command isn't executing the same steps that windows and nvm-windows likely requires. Just my suspicion.

@amiram
Copy link
Author

amiram commented Feb 15, 2017

In windows you can install node in two ways. First is just download the installer from nodejs website. This installs node in C:\Program Files\nodejs. Second way, which is the way I use, is using nvm-windows. This is installing node in %userprofile%\AppData\Roaming\nvm\vx.x.x which create a vx.x.x folder for each version. C:\Program Files\nodejs is a symlink to the current version you set in nvm-windows. Except from that, all npm commands are the same.
BTW, do you know from the above whick command failed? Also, why is it trying to install sicksync? I already did that.

@joelgriffith
Copy link
Contributor

sicksync update is just a small helper utility for updating itself, which I'll admit is strange. The nice thing about this command, as opposed to manually updating, is that it will also update sicksync on your remote machines as well. Otherwise, you'd have to manually ssh into each machine and update manually, which was a bit time consuming.

I wonder if the doctor command would find anything... could you try running sicksync doctor and see what that says?

@amiram
Copy link
Author

amiram commented Feb 22, 2017

This is what I get for doctor:

  • Checking if config is present...
    Found the sicksync config file!

  • Checking config file...
    sicksync's config has all the right properties and looks good!

  • Checking projects in config file...
    src has all the right properties and looks good!

  • Checking host for each project
    events.js:160
    throw er; // Unhandled 'error' event
    ^

Error: spawn ssh ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:359:16)
at _combinedTickCallback (internal/process/next_tick.js:74:11)
at process._tickCallback (internal/process/next_tick.js:98:9)

@amiram
Copy link
Author

amiram commented Feb 22, 2017

The above is probably because I used cmd.exe. If I use mingw64 I get this although I can do ssh without a problem:

$ sicksync doctor

  • Checking if config is present...
    Found the sicksync config file!

  • Checking config file...
    sicksync's config has all the right properties and looks good!

  • Checking projects in config file...
    src has all the right properties and looks good!

  • Checking host for each project
    Successfully connected to x.x.x.x with user xxx!

  • Checking sicksync on hosts for each project
    Timed out waiting to connect to x.x.x.x with user xxx
    Check to make sure your machine is reachable by by sshing: xxx@x.x.x.x
    (node:11656) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants