2

Our client uses a windows machine and would like to have an eye on development and from time to time contribute little pieces of code.

We set up everything on linux, and it flies beautifully :)

Now, the server script doesn't run on Windows (ran npm install and all that) The script does:

SET NODE_ENV=development
node_modules\.bin\forever.cmd -c node_modules\.bin\coffee app.coffee

This is the output:

C:\Users\user\Documents\GitHub\myapp\server>node_modules\.bin\forever.cmd -c node_modules\.bin\coffee app.coffee

warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up f
or at least 1000ms

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

I understand it's kind of trying to spawn some child process, but don't understand which one and why.

maybe related to: Why am I getting errors running the coffee command in cygwin? (not using cygwin though, but windows powershell)

Community
  • 1
  • 1
transient_loop
  • 5,984
  • 15
  • 58
  • 117

1 Answers1

0

Looking at how you're calling the forever and coffeescript commands I'm going to assume those packages are to be installed locally (not globally) and are specified in your package.json.

If this is the case then maybe you can try creating a command in the scripts part of your package.json that will do what your current script does, like this:

{
  "name": "my-project",
  "version": 0.0.1,
  "scripts": {
    "forever-coffee": "forever -c coffee app.coffee"
  }
}

And run this on the root of your project: npm run forever-coffee

It should work on both Linux and Windows.

alebelcor
  • 353
  • 4
  • 10