lcm server --watch doesn't work #117

Open
Danita opened this Issue Dec 4, 2013 · 5 comments

Comments

Projects
None yet
5 participants

Danita commented Dec 4, 2013

I have setup a small Locomotive application and it works perfectly when booted with lcm server, but I have to constantly stop and restart everytime I change the source code. I tried to auto reload with --watch but then it doesn't even start the server.

I'm using Windows 7 x64, node v0.10.5
EDIT: Also relevant: using GitBash and Locomotive 0.3.7

$ lcm server --watch

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: spawn ENOENT
    at errnoException (child_process.js:975:11)
    at Process.ChildProcess._handle.onexit (child_process.js:766:34)
Contributor

robertklep commented Dec 4, 2013

@Danita

--watch depends on supervisor being installed (or nodemon if you use --use-nodemon).

I don't think these are listed as dependencies of the locomotive package, so try installing one of them manually to see if that solves your problem.

Danita commented Dec 4, 2013

Thanks for the prompt response. I tried to install supervisor and nodemon (with -g) but --watch keeps throwing the exact same error.

redking commented Dec 4, 2013

Hey,

I raised this issue previously #91

I understand it'll be resolved in the next tagged release (as lcm server is deprecated in favour of a server.js launch file)

Ive tried like this in node js command prompt
c:\project> supervisor --watch app/controllers,config,config/environments,config/initializers -- node_modules/locomotive/bin/lcm.js server

It would automatically restart server and generating output instantly like watch.

Reference
https://gist.github.com/neojp/1847429

Couldn't this be solved as easily as adding supervisor to locomotives dev or optional dependencies?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment