title: Testcafe Docker - Error: TypeScript compilation failed.Cannot find name 'require'
body: <p>I am getting below error when I try to run type script from latest testcafe docker image.</p>
  
  <p>The same script was working fine with the older version docker pull testcafe/testcafe:1.4.3.</p>
  
  <p>Create ts file and add below code </p>
  
  <p>var config = require('./loginDetails.json');
  and try to run it from testcafe docker.</p>
  
  <p>Command used:</p>
  
  <p>docker run -v /var/jenkins/workspace/:/tests -i testcafe/testcafe 'chromium --no-sandbox' '/tests/*.ts' -e -u --selector-timeout 10000 --assertion-timeout 10000 -S -s /tests -r spec,xunit:/tests/res.xml,json:/tests/res.json -T '1681'</p>
  
  <p>Error: TypeScript compilation failed.
  /tests/commonFunctions.ts (2, 14): Cannot find name 'require'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.
  /tests/commonFunctions.ts (52, 25): Cannot find name 'process'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.
  /tests/commonFunctions.ts (53, 13): Cannot find name 'process'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.
  /tests/commonFunctions.ts (55, 28): Cannot find name 'process'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.
  /tests/commonFunctions.ts (89, 22): Cannot find name 'require'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.
  /tests/login.ts (3, 14): Cannot find name 'require'. Do you need to install type definitions for node? Try <code>npm i @types/node</code>.</p>
  
  <pre><code>at Function._reportErrors (/usr/lib/node_modules/testcafe/src/compiler/test-file/formats/typescript/compiler.ts:79:15)
  at TypeScriptTestFileCompiler._compileFilesToCache (/usr/lib/node_modules/testcafe/src/compiler/test-file/formats/typescript/compiler.ts:101:40)
  at TypeScriptTestFileCompiler._precompileCode (/usr/lib/node_modules/testcafe/src/compiler/test-file/formats/typescript/compiler.ts:129:18)
  at TypeScriptTestFileCompiler._compileCodeForTestFiles (/usr/lib/node_modules/testcafe/src/compiler/test-file/api-based.js:111:29)
  at tsConfig.init.then (/usr/lib/node_modules/testcafe/src/compiler/test-file/formats/typescript/compiler.ts:85:30)
  </code></pre>