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

ENOENT #6

Open
happytomatoe opened this issue Jun 27, 2017 · 11 comments
Open

ENOENT #6

happytomatoe opened this issue Jun 27, 2017 · 11 comments

Comments

@happytomatoe
Copy link

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

@Teelord
Copy link

Teelord commented Jun 28, 2017

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

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

@onesharklogan
Copy link

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

@onesharklogan
Copy link

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.

@indiana
Copy link

indiana commented Jun 29, 2017

Same problem on Node v6.9.1, Win10.

@JanisRubens
Copy link

Same problem on v6.10.0 Win10

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

@jeryckho
Copy link

Same problem here, node v6.9.5 Win7

@6rilme
Copy link

6rilme commented Jul 17, 2017

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 } )

@develephant
Copy link
Owner

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

Cheers.

@olixis
Copy link

olixis commented Jul 25, 2017

not working on windows 7, but great project.

@shallowfoot
Copy link

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

@StephenKairos
Copy link

StephenKairos commented Jan 15, 2019

@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.

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