title: Error compiling typescript in docker for express app
body: <p>I'm trying to run a typescript app in docker but I am running into some issues.</p>
  
  <p>The error that I receive is <code>sh: 1: tsc: not found</code>, despite typescript being in the dev-dependencies. I ideally thought that given in my dockerfile I am running npm install, it would also install the devDependencies and bring in Typescript, but is that not true?</p>
  
  <p>My <code>package.json</code> is :</p>
  
  <pre><code>{
    "name": "ts-express-starter-kit",
    "version": "1.0.0",
    "description": "Opinionated starter kit for typescript and express",
    "main": "dist/index.js",
    "scripts": {
      "dev": "concurrently -k -n \"TypeScript,Node\" -c \"yellow.bold,cyan.bold\" \"npm run watch-ts\" \"nodemon ./dist/index.js\"",
      "watch-ts": "tsc -w"
    },
    "keywords": [
      "typescript",
      "express"
    ],
    "dependencies": {
      "@types/config": "0.0.34",
      "@types/cookie-parser": "^1.4.1",
      "@types/cors": "^2.8.5",
      "@types/express": "^4.17.0",
      "@types/lodash": "^4.14.138",
      "@types/morgan": "^1.7.35",
      "@types/mysql": "^2.15.6",
      "@types/node": "^12.0.10",
      "config": "^3.1.0",
      "cookie-parser": "^1.4.4",
      "cors": "^2.8.5",
      "express": "^4.17.1",
      "express-enrouten": "^1.3.0",
      "lodash": "^4.17.11",
      "moment": "^2.24.0",
      "morgan": "^1.9.1",
      "mysql": "^2.17.1",
      "sequelize": "^5.18.4",
      "sequelize-cli": "^5.5.0",
      "typescript": "^3.5.1",
      "winston": "^3.2.1"
    },
    "devDependencies": {
      "concurrently": "^5.0.0",
      "nodemon": "^2.0.1",
      "ts-node": "^8.5.4"
    }
  }
  </code></pre>
  
  <p>My <code>Dockerfile</code> is :</p>
  
  <pre><code>FROM node:10
  WORKDIR /app
  COPY package*.json ./
  RUN npm install
  COPY . .
  EXPOSE 8080
  CMD [ "npm", "run", "dev" ]
  </code></pre>
  
  <p>And <code>docker-compose.yaml</code> is:</p>
  
  <pre><code>version: "3"
  services:
    app:
      container_name: tw-backend # How the container will appear when listing containers from the CLI
      build: .
      image: node:10 
      user: node 
      working_dir: "/app" 
      networks:
      - app
      ports:
      - "8080:8080" 
      volumes:
      - ./:/app docker 
  
  networks:
    app:
  </code></pre>