Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsc.exe doesn't work on Windows Server 2012 #11339

Closed
ahmelsayed opened this issue Oct 4, 2016 · 10 comments
Closed

tsc.exe doesn't work on Windows Server 2012 #11339

ahmelsayed opened this issue Oct 4, 2016 · 10 comments
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority

Comments

@ahmelsayed
Copy link
Member

ahmelsayed commented Oct 4, 2016

TypeScript Version: 2.0.3

Repro:

  1. Get a Windows 2012 Server instance.

  2. use the following code

Test.ts

class Test {
    test() {
        console.debug("Hey there!");
    }
}

Test2.ts

class Test2 {
    test() {
        console.debug("Hey there!");
    }
}

tsconfig.json

{
  "compilerOptions": {
    "noImplicitAny": false,
    "noEmitOnError": true,
    "removeComments": true,
    "sourceMap": true,
    "target": "es6",
    "module": "amd",
    "outFile": "wwwroot/app/app.js",
    "strictNullChecks": true
  },
  "compileOnSave": true
}
  1. copy C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.0\ to the VM (or install TypeScript_Dev14Full.exe)

  2. run C:\temp\TypeScript\2.0\tsc.exe

Expected behavior:
To Work. It works fine on 2012 R2 and Windows 10 Client

Actual behavior:

Script failed with error: 'JsErrorScriptException (0x30001)'.
Unable to get property 'length' of undefined or null reference
TypeError: Unable to get property 'length' of undefined or null reference
   at compareStrings (Unknown script code:672:17)
   at compareStringsCaseInsensitive (Unknown script code:684:9)
   at Array.prototype.sort (native code)
   at matchFileNames (Unknown script code:39261:9)
   at getFileNames (Unknown script code:39139:13)
   at parseJsonConfigFileContent (Unknown script code:39089:9)
   at parseConfigFile (Unknown script code:39654:13)
   at performCompilation (Unknown script code:39676:21)
   at executeCommandLine (Unknown script code:39627:9)
   at Global code (Unknown script code:39945:1)

Some observations:
This only happens if you have more than 1 .ts file.

@davidebbo
Copy link

To add to this, Windows Server 2012 is what's used throughout Azure App Service today, so this bug is effectively making the new TypeScript unusable on that platform.

@vladima
Copy link
Contributor

vladima commented Oct 4, 2016

this looks like a duplicate of #11110 that was already fixed in master (fix was also ported into release 2.0.5). Can you try nightly build to check if you still see the error?

@ahmelsayed
Copy link
Member Author

@vladima would you mind pointing me to where I can get that build to try? I only picked up released versions of TypeScript from typescriptlang.org before and have no idea where to get a nightly build from

@davidebbo
Copy link

@vladima any idea where we can pick up a build to test this? Or when do you expect it to make it into a real release? Thanks!

@vladima
Copy link
Contributor

vladima commented Oct 10, 2016

the fix was already checked in into release-2.0.5 and thus will go into the next release. Also it was cherry-picked into master and should be available in should today's nightly builds on npm (check typescript@next) or myget

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Oct 10, 2016
@mhegazy mhegazy closed this as completed Oct 10, 2016
@ahmelsayed
Copy link
Member Author

When is the next release scheduled? To iterate David's comment, we can't support TypeScript on Azure App Service until we have a build of tsc that works with msbuild on Windows Server 2012.

@mhegazy mhegazy removed the Fixed A PR has been merged for this issue label Oct 11, 2016
@mhegazy mhegazy reopened this Oct 11, 2016
@mhegazy
Copy link
Contributor

mhegazy commented Oct 11, 2016

Looking at this more, this is not the same issue as #11110. It looks related though. so we need to get a different fix in.

@mhegazy
Copy link
Contributor

mhegazy commented Oct 25, 2016

@ahmelsayed, TypeScript 2.0.6 should be available now; please give it a try and let us know if there are other issues.

@mhegazy mhegazy reopened this Oct 25, 2016
@mhegazy mhegazy closed this as completed Oct 25, 2016
@watashiSHUN
Copy link

@mhegazy Did this by any chance not make it into 2.1? We see the same error again running 2.1.4 on Windows Server 2012

@mhegazy
Copy link
Contributor

mhegazy commented Jan 11, 2017

That is a new issue then. Please create a new issue and share some context for us to be able to reproduce and diagnose.

@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A bug in TypeScript Fixed A PR has been merged for this issue High Priority
Projects
None yet
Development

No branches or pull requests

6 participants