title: angular 2 app in docker container failing. Failed to exec start script.
body: <p>I have a compose file with an angular service, an express service, and a mongo database service. When I run docker-compose up --build, I get the following error: </p>
  
  <pre><code>    &gt; angular-client@0.0.0 start /usr/src/app/angular
      &gt; ng serve --host 0.0.0.0.0 --port 4200
      2017-06-27T05:25:03.712327811Z 
      sh: 1: ng: not found
      2017-06-27T05:25:03.732751350Z 
      npm info lifecycle angular-client@0.0.0~start: Failed to exec start
      script
      npm ERR! Linux 4.4.66-boot2docker
      npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
      npm ERR! node v7.10.0
      npm ERR! npm  v4.2.0
      npm ERR! file sh
      npm ERR! code ELIFECYCLE
      npm ERR! errno ENOENT
      npm ERR! syscall spawn
      npm ERR! angular-client@0.0.0 start: `ng serve --host 0.0.0.0.0 --port 4200`
      npm ERR! spawn ENOENT
      npm ERR! 
      npm ERR! Failed at the angular-client@0.0.0 start script 'ng serve --host 0.0.0.0.0 --port 4200'.
      npm ERR! Make sure you have the latest version of node.js and npm installed.
      npm ERR! If you do, this is most likely a problem with the angular-client package,
      npm ERR! not with npm itself.
      npm ERR! Tell the author that this fails on your system:
      npm ERR!     ng serve --host 0.0.0.0.0 --port 4200
      npm ERR! You can get information on how to open an issue for this project with:
      npm ERR!     npm bugs angular-client
      npm ERR! Or if that isn't available, you can get their info via:
      npm ERR!     npm owner ls angular-client
      npm ERR! There is likely additional logging output above.
      npm WARN Local package.json exists, but node_modules missing, did you mean to install?
      2017-06-27T05:25:03.806272456Z 
      npm ERR! Please include the following file with any support request:
      npm ERR!     /root/.npm/_logs/2017-06-27T05_25_03_786Z-debug.log
  </code></pre>
  
  <p>This docker image was initially created on Ubuntu, where it works fine. This problem on started occurring when I pulled from github/dockerhub and ran docker-compose from Windows. </p>
  
  <p>Here is my <strong>DOCKERFILE</strong>:</p>
  
  <pre><code>    # Create image based on official Ubuntu 16.10 image
      FROM ubuntu:16.10
  
      # Create image based on the official Node 7 image from dockerhub
      FROM node:7
  
      # Create a directory where our app will be placed
      RUN mkdir -p /usr/src/app/angular
  
      # Change directory so that our commands run inside this new directory
      WORKDIR /usr/src/app/angular
  
      # Copy dependency definitions
      COPY package.json /usr/src/app/angular
  
      # Install dependecies
      RUN npm install
  
      # Get all the code needed to run the app
      COPY . /usr/src/app/angular
  
      # Expose the port the app runs in
      EXPOSE 4200
  
      # Serve the app
      CMD ["npm", "start"]
  </code></pre>
  
  <p>Here is my <strong>package.json</strong>:</p>
  
  <pre><code>     "name": "angular-client",
       "version": "0.0.0",
       "license": "MIT",
       "angular-cli": {},
       "scripts": {
       "ng": "ng",
       "start": "ng serve --host 0.0.0.0.0 --port 4200",
       "test": "ng test",
       "pree2e": "webdriver-manager update --standalone false --gecko false",
       "e2e": "protractor"
       },
       "private": true,
       "dependencies": {
       "@angular/common": "4.1.3",
       "@angular/compiler": "*",
       "@angular/core": "^4.1.3",
       "@angular/forms": "^4.1.3",
       "@angular/http": "*",
       "@angular/platform-browser": "^4.1.3",
       "@angular/platform-browser-dynamic": "^4.1.3",
       "@angular/router": "*",
       "angular2-auth": "*",
       "angular2-flash-messages": "^1.0.5",
       "angular2-froala-wysiwyg": "^2.6.0",
       "angular2-jwt": "^0.2.0",
       "core-js": "^2.4.1",
       "ng2-datepicker": "^1.8.3",
       "ng2-pagination": "^2.0.1",
       "ngx-dropdown": "0.0.22",
       "rxjs": "^5.0.1",
       "ts-helpers": "^1.1.1",
       "zone.js": "^0.8.4"
       },
       "devDependencies": {
       "@angular/cli": "^1.0.0",
       "@angular/compiler-cli": "^4.1.3",
       "@angular/core": "^4.1.3",
       "@types/jasmine": "2.5.51",
       "@types/node": "^7.0.29",
       "codelyzer": "~3.0.1",
       "jasmine-core": "2.6.3",
       "jasmine-spec-reporter": "4.1.0",
       "karma": "1.7.0",
       "karma-chrome-launcher": "^2.0.0",
       "karma-cli": "^1.0.1",
       "karma-jasmine": "^1.0.2",
       "karma-remap-istanbul": "^0.6.0",
       "protractor": "~5.1.2",
       "ts-node": "3.0.6",
       "tslint": "^5.4.3",
       "typescript": "~2.3.4"
       }
     }
  </code></pre>