takeoff-env / takeoff

A rapid development environment using docker for convenience.
https://takeoff.sh/
MIT License
271 stars 17 forks source link

Windows docker-compose build fails #12

Closed tanepiper closed 6 years ago

tanepiper commented 7 years ago

Output:

events.js:182
      throw er; // Unhandled 'error' event
      ^

Error: spawn sleep ENOENT
    at exports._errnoException (util.js:1016:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:189:19)
    at onErrorNT (internal/child_process.js:366:16)
    at _combinedTickCallback (internal/process/next_tick.js:102:11)
    at process._tickCallback (internal/process/next_tick.js:161:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! takeoff@1.0.0 to:build: `node utilities/takeoff/docker-compose-build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the takeoff@1.0.0 to:build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Will require further debugging

teyc commented 6 years ago

The windows cmd prompt doesn't understand the command line switch -p or the forward slash in the directory name

-   { cmd: `mkdir -p envs/${environment}`, message: 'Creating environment' },
+   { cmd: `cmd /c mkdir envs\\${environment}`, 

In addition, if the http service is running, then you can't bind on port 80. This can be stopped with

net stop w3svc

tanepiper commented 6 years ago

@teyc I've added a pull request that should resolve this. Are you able to test this?

tanepiper commented 6 years ago

Fixed with using shell.js