title: Cannot find module '../lib/tsc.js' when releasing typescript application to azure
body: <p>I'm trying to release a typescript application to a Azure App Service running on Linux. I'm doing this using Azure DevOps. I've setup a build and release pipeline which succeed, but when I visit the URL of my app service, I see a message saying ":c Application Error" and it refers to the diagnostic logs. These logs give me the following error:</p>
  
  <blockquote>
    <p>Error: Cannot find module '../lib/tsc.js'</p>
  </blockquote>
  
  <p><strong>Full Error Log</strong></p>
  
  <pre><code>myApp@1.0.0 prod /home/site/wwwroot
  &gt; npm run build &amp;&amp; npm run start
  &gt; myApp@1.0.0 build /home/site/wwwroot
  &gt; tsc
  internal/modules/cjs/loader.js:583
  throw err;
  ^
  Error: Cannot find module '../lib/tsc.js'
      at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
      at Function.Module._load (internal/modules/cjs/loader.js:507:25)
      at Module.require (internal/modules/cjs/loader.js:637:17)
      at require (internal/modules/cjs/helpers.js:22:18)
      at Object. (/home/site/wwwroot/node_modules/.bin/tsc:2:1)
      at Module._compile (internal/modules/cjs/loader.js:689:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
      at Module.load (internal/modules/cjs/loader.js:599:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
      at Function.Module._load (internal/modules/cjs/loader.js:530:3)
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! myApp@1.0.0 build: `tsc`
  npm ERR! Exit status 1
  </code></pre>
  
  <p>My Azure Devops environment cosists of build pipeline which performs a npm install and publishes that to an artifact and a release pipeline which performs a deploy and then runs a start command. These steps succeed and the start command is ran, but it creates the above errors.</p>
  
  <p>I've tried building the application before creating the artifact, but this gave errors in the build step where it couldn't find files that were being imported. I can run the <strong>npm run prod</strong> command without any issues localy.</p>
  
  <p>Does anyone have any idea what could be causing this? </p>
  
  <p><strong>Package.json</strong></p>
  
  <pre><code>{
  "name": "MyApp",
  "version": "1.0.0",
  "description": "",
  "main": "./dist/index.js",
  "scripts": {
  "build": "tsc",
  "dev": "nodemon --watch 'src/**/*.ts' --ignore 'src/**/*.spec.ts' --exec ts-node src/index.ts",
  "start": "nodemon ./dist/index.js",
  "prod": "npm run build &amp;&amp; npm run start",
  "test": "mocha --ui tdd -r ts-node/register tests/**/*.test.ts"
  },
  "author": "",
  "license": "ISC",
  "dependencies": {
      "@google/chatbase": "^1.1.2",
      "@types/express": "^4.17.0",
      "actions-on-google": "^2.7.1",
      "body-parser": "^1.19.0",
      "dotenv": "^8.0.0",
      "express": "^4.17.1",
      "morgan": "^1.9.1",
      "nodemon": "^1.19.1",
      "ssml-builder": "^0.4.3",
      "ts-sinon": "^1.0.17",
      "ts-node": "^8.3.0",
      "tsc-watch": "^2.2.1",
      "typescript": "^3.5.3",
      "uuid": "^3.3.2"
      },
  "devDependencies": {
      "@types/chai": "^4.1.7",
      "@types/mocha": "^5.2.7",
      "chai": "^4.2.0",
      "mocha": "^6.1.4"
  }
  }
  </code></pre>
  
  <p><strong>Tsconfig.json</strong></p>
  
  <pre><code>{
  "compilerOptions": {
  "module": "commonjs",
    "moduleResolution": "node",
    "pretty": true,
    "sourceMap": true,
    "target": "es6",
    "outDir": "./dist",
    "baseUrl": "./src",
    "resolveJsonModule": true,
    "esModuleInterop": true,
  },
  "include": [
    "src/**/*.ts",
    "src/data/*.json",
    "src/data/sounds/*.mp3"
  ],
  "exclude": [
    "node_modules"
  ]
  }
  </code></pre>