phaser-node-kit icon indicating copy to clipboard operation
phaser-node-kit copied to clipboard

ENOENT

Open happytomatoe opened this issue 8 years ago • 11 comments

pnkit watch

» Development Mode Activated
events.js:161
throw er; // Unhandled 'error' event
^

Error: spawn light-server ENOENT
at exports._errnoException (util.js:1023: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)
at Module.runMain (module.js:607:11)
at run (bootstrap_node.js:418:7)
at startup (bootstrap_node.js:139:9)
at bootstrap_node.js:533:3

happytomatoe avatar Jun 27 '17 19:06 happytomatoe

I'm afraid that I've run into this issue, too.

I'm running Node v6.11.0 on Windows 10.

Teelord avatar Jun 28 '17 16:06 Teelord

Same for me - i get that error although i've nooodled around and tried various things to resolve.

onesharklogan avatar Jun 29 '17 00:06 onesharklogan

I thought perhaps my node version wasn't the same as the person who create the guide? Maybe we could try to get the same version installed.

onesharklogan avatar Jun 29 '17 00:06 onesharklogan

Same problem on Node v6.9.1, Win10.

indiana avatar Jun 29 '17 05:06 indiana

Same problem on v6.10.0 Win10

pnkit init seems to not generate package.json file as well.

JanisRubens avatar Jul 05 '17 18:07 JanisRubens

Same problem here, node v6.9.5 Win7

jeryckho avatar Jul 12 '17 18:07 jeryckho

I found where the problem occurs: on Windows, the linux version of light-server is spawned.

in C:\Users[UserName]\AppData\Roaming\npm\node_modules\phaser-node-kit\lib\watch.js

replace on line 125: const lightServer = spawn('light-server', ['-s', dir, '-p', port, '-b', host, '-q'], { cwd: path.join(paths.cli.base, 'node_modules', '.bin'), stdio: null } )

with: const lightServer = spawn('light-server.cmd', ['-s', dir, '-p', port, '-b', host, '-q'], { cwd: path.join(paths.cli.base, 'node_modules', '.bin'), stdio: null } )

6rilme avatar Jul 17 '17 07:07 6rilme

@6rilme - Thanks for catching that. I will update the source.

Cheers.

develephant avatar Jul 22 '17 14:07 develephant

not working on windows 7, but great project.

olixis avatar Jul 25 '17 02:07 olixis

any resolve on this issue? Any help or work around to use this kit would be grateful thanks.

shallowfoot avatar Oct 03 '17 03:10 shallowfoot

@shallowfoot @olixis @develephant It's been a while, but the fix above by @6rilme works. You'll need to apply it to the other files though, to get the rest of the pnkit commands to work.

  1. Go to the folder C:\Users[UserName]\AppData\Roaming\npm\node_modules\phaser-node-kit\lib
  2. Look in files: build.js (line 42), update.js (line 22)
  3. Replace line any section const npm = spawn('npm', with const npm = spawn('npm.cmd',

The fix with watch.js file above should also work.

StephenKairos avatar Jan 15 '19 06:01 StephenKairos