Rob Koch
Rob Koch

Reputation: 1583

TypeScript compile error in Visual Studio 2015

Installed Visual Studio 2015, added a TypeScript file to an existing project folder. File looks like this (from a Telerik sample):

interface Book {
    title: string;
    author: string;
    bookInfo: () => string;
}

var b: Book = {
    title: 'Moby Dick',
    author: 'Herman Melville',
    bookInfo: function () {
        return this.title + " by : " + this.author;
    }
}

var book = b.bookInfo();
alert(book);

Upon building the solution, I got an error:

Severity: Error Description: Automation server can't create object
Project: Project1
File: VSTSC

Went into Developer Command Prompt for VS2015 and ran tsc just to see what comes back:

C:\Tfs\Project1\Scripts\app>tsc tsc.js(703, 13) JavaScript runtime error: Automation server can't create object

Same message as the one in Visual Studio 2015.

Unsure what is the problem with the TypeScript compiler. I did make sure I installed TypeScript 1.5.4 via Tools > Extensions and Updates.

What shall my next step be?

Upvotes: 1

Views: 1938

Answers (2)

basarat
basarat

Reputation: 276265

The default tsc on windows (non node version) uses IE's JavaScript engine to execute the JavaScript.

From here:

The simple solution may be to reset your IE security settings to the default Medium-high setting

Also disable any third party active x components you installed in IE.

Upvotes: 1

Oleh Dokuka
Oleh Dokuka

Reputation: 12194

It looks like as one of well known issue. Consider this link

Upvotes: 1

Related Questions