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

eiis command error #6

Open
wowsonsun opened this issue Mar 20, 2019 · 6 comments
Open

eiis command error #6

wowsonsun opened this issue Mar 20, 2019 · 6 comments
Labels
enhancement New feature or request

Comments

@wowsonsun
Copy link

When I installed ‘npm install -g electron-image-ipc-server’, type ‘eiis’ and the following error occurred.
error

@wowsonsun
Copy link
Author

I looked at the source code according to the prompt's error and found the prompt "spawn"
  Unknown" is in the source code

source code

@njleonzhang
Copy link
Owner

sorry. it currently haven't tested on Windows, and just work for Mac os. I will try to support Windows later.

@njleonzhang njleonzhang added the enhancement New feature or request label Mar 20, 2019
@wowsonsun
Copy link
Author

Thank you, I am looking forward to supporting Windows. I hope this plugin can be marked for MAC only.= =

@njleonzhang
Copy link
Owner

njleonzhang commented Mar 20, 2019

@wowsonsun sorry for the convenience

@dreamer2q
Copy link

internal/child_process.js:405
    throw errnoException(err, 'spawn');
    ^

Error: spawn UNKNOWN
    at ChildProcess.spawn (internal/child_process.js:405:11)
    at spawn (child_process.js:548:9)
    at Object.<anonymous> (C:\Users\dreamer2q\scoop\persist\nodejs\bin\node_modules\electron-image-ipc-server\index.js:18:12)   
    at Module._compile (internal/modules/cjs/loader.js:1147:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1167:10)
    at Module.load (internal/modules/cjs/loader.js:996:32)
    at Function.Module._load (internal/modules/cjs/loader.js:896:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
    at internal/main/run_main_module.js:17:47 {
  errno: -4094,
  code: 'UNKNOWN',
  syscall: 'spawn'
}

Same issue, frustrated!

@Amomum
Copy link

Amomum commented May 24, 2020

I also stumbled into this on my Windows 7.
Looks like the reason is that that spawn call for some reason tries to spawn a .js file directly and that is not possible on Windows; you have to run it like node smth.js.

Your package json should have resolved that by 'bin' property - but for some reason it didn't.

So I tried to change this spawn line:

electron = spawn(electronPath, [scriptPath, scriptPath], {
    env: spawn_env,
    stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});

to this:

electron = spawn('node', [electronPath, scriptPath, scriptPath], {
    env: spawn_env,
    stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});

And the error went away! However, extension still doesn't work :( and not giving any obvious errors anywhere. just quietly does nothing. Electron doesn't seem to be executed, my github API key is not used.
I'm not sure where to look next.

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

No branches or pull requests

4 participants