Compilation failure due to Typescript initialization issue

Encountering a TypeScript error in my IntelliJ-Idea 2017.1.1 IDE

I have enabled JavaScript, NodeJS, and TypeScript Compiler.

I have exhausted all solutions but the issue persists, perhaps I am missing something.

Error: Initialization error (typescript). Cannot read property 'createHash of undefined

Is there anyone who can assist me in resolving this?

https://i.stack.imgur.com/qTjV6.png

https://i.stack.imgur.com/AmtoJ.png

package.json

{
  "name": "TempPractice",
  "version": "0.0.1",
  "description": "First Angular App",
  "license": "MIT",
  "repository": {
    "type": "git",
    "url": "<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d8bfb1ac98bfb1acb0adbaf6bbb7b5">[email protected]</a>:angularjs-de/angularjs-typescript-seed.git"
  },
  "main": "app/app.ts",
  "scripts": {
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "lite": "lite-server",
    "typings": "typings",
    "postinstall": "typings install",
    "update-deps": "npm update",
    "postupdate-deps": "bower update",
    "prestart": "npm install",
    "start": "http-server -a localhost -p 8000 -c-1 ./app",
    "pretest": "npm install",
    "test": "karma start karma.conf.js",
    "test-single-run": "karma start karma.conf.js --single-run",
    "preupdate-webdriver": "npm install",
    "update-webdriver": "webdriver-manager update",
    "preprotractor": "npm run update-webdriver",
    "protractor": "protractor e2e-tests/protractor.conf.js",
    "update-index-async": "node -e \"var fs=require('fs'),indexFile='app/index-async.html',loaderFile='app/bower_components/angular-loader/angular-loader.min.js',loaderText=fs.readFileSync(loaderFile,'utf-8').split(/sourceMappingURL=angular-loader.min.js.map/).join('sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map'),indexText=fs.readFileSync(indexFile,'utf-8').split(/\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/).join('//@@NG_LOADER_START@@\\n'+loaderText+'    //@@NG_LOADER_END@@');fs.writeFileSync(indexFile,indexText);\""
  },
  "dependencies": {
    "@angular/common": "^4.4.4",
    "@angular/compiler": "^4.4.4",
    ...
    "zone.js": "^0.8.18"
  }
}

tsconfig.json

  {
     "compilerOptions": {
        "module": "system",
        ...
        "exclude": [
            "node_modules",
            "typings/main",
            "typings/main.d.ts"
        ]
     },
     "compileOnSave": false
  }

typings.json

  {  
     "ambientDependencies": {  
         "es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",  
         "jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd"  
     }  
  }  

Answer №1

The current version of TypeScript being used (2.5.3) is not compatible with the TypeScript service integration available in 2017.1.1. This compatibility issue stems from significant changes in the service API (https://github.com/Microsoft/TypeScript/issues/15433).

The bug outlined in WEB-26641 has been resolved in 2017.1.3, making it compatible with all TypeScript versions up to 2.4. However, be aware that any version 2.5.x introduces additional breaking changes. To use IDEA with TypeScript 2.5.3, it is necessary to update to the latest IDEA version.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How to Add a Rule to an Existing Application Load Balancer Listener using AWS CDK

When I inherited a project, I discovered an application load balancer with a HTTPS Listener that was set up before I began using CDK. This listener currently has 13 rules in place that route requests based on hostname to different fargate instances, with ...

What is the process to transmit JSON using JavaScript and interpret it in Perl?

Having trouble sending JSON data with JavaScript and reading it in a Perl script? Check out the code snippet below, where I am facing difficulties getting the Perl script to interpret the JSON text. HTML: <!DOCTYPE html> <html> <head> & ...

Unleashing the Power of Python for Extracting Data from Websites Using JSON Technology

I'm attempting to retrieve the price of a single item from a specific website, but I'm encountering difficulties when examining the page source. The URL in question is: I am particularly interested in this part of the page source (I assume): &l ...

Is there a way to incorporate an array within an object using YAML?

Suppose you have a Map<String, Object> called "something" in YAML something: The corresponding JSON should be as follows: "something": { "else": "then", "array": [ "element in array" ] } So for this YAML specification ...

Encountering a Typescript error when trying to invoke a redux action

I have created a redux action to show an alert message export const showAlertConfirm = (msg) => (dispatch) => { dispatch({ type: SHOW_ALERT_CONFIRM, payload: { title: msg.title, body: msg.body, ...

Statistics Sweden SCB API call was made, but unfortunately, no data was retrieved

I am having trouble accessing the actual values of the data in my table, as all I can see is the dates in the JSON output generated. The specific link I am using is: "http://api.scb.se/OV0104/v1/doris/en/ssd/START/FM/FM5001/FM5001A/FM5001SDDSPM" ...

Creating a new object through manipulation of existing objects

In my attempt to transform an existing object into a new object structure, I am facing some challenges. Here is the current data set: const jsonStructure = { "a11/a22/animations": "snimations", "a11/a22/colours": "sl/colours", "a11/a22/fonts" ...

Utilizing Google OAuth2 API within an Angular2 Typescript Application

Looking to incorporate the Google oauth2 API and Calender API into my Angular2 application. Struggling to find a working sample to guide me through the integration process. Has anyone come across a functioning example? Thanks, Hacki ...

Exploring OOP Strategies within the Angular MVC Framework!

After coming across a question on Stack Overflow that was similar to mine, I realized I have a lot to learn about Object-Oriented Programming (OOP). Up until now, my coding experience has been mainly procedural. Before diving into my question, let me provi ...

What is the best way to bring a file from a different directory that is located on the same level?

Is there a way to import content from a file located in another directory at the same level? For instance, if I am working with file 1 in folder 1 and need to import information from file 2 in folder 2, how can this be achieved? I am encountering an error ...

Plugin for managing network connectivity in Ionic framework

In order to check if internet and id connection are available, I need to make a server request. I have implemented the Ionic Native Network Plugin following their official documentation. Here is my code snippet: import { Component } from '@angular/c ...

IntelliJ is indicating a typescript error related to react-bootstrap-table-next

Working with react-bootstrap-table-next (also known as react-bootstrap-table2) has been causing a Typescript error in my IntelliJ environment, specifically on the validator field within my column definition. Despite trying various solutions, such as adding ...

While attempting to use $scope.$apply() in Angular, I encountered a bug that

I have set up a specific example in a jsbin: http://jsbin.com/deqerelita/1/ Situation The concept is quite straightforward. You click a button, the controller adds to the model, and the view updates accordingly with a hidden input type="file". After the v ...

The magical form component in React using TypeScript with the powerful react-final-form

My goal is to develop a 3-step form using react-final-form with TypeScript in React.js. I found inspiration from codesandbox, but I am encountering an issue with the const static Page. I am struggling to convert it to TypeScript and honestly, I don't ...

Master the art of converting text to json from an API that provides text responses using Python

When I make a call to a Rest API, it appears to only be returning text. gma:AciX8_0002 hypothetical protein I need to receive the data in json format. Even after trying to set the header content-type to application/json in Postman, I am still only g ...

A bespoke Typescript implementation of nested lists containing numbers

Currently, I am trying to figure out how to declare and populate a TypeScript list of lists. The structure of the list should be as follows: List<CustomList<>, number> Typically, I would create a standard list like this: someList: { text: a ...

problem with sending JSON data as a string

I am trying to send a property of type 'string' to a WCF server. The string will contain JSON data, but I keep encountering this error: The server has encountered an error while processing the request. The exception message is 'There was an ...

Angular controller utilizing the `focusin` and `focusout` events from jQuery

Can anyone help me figure out why this piece of code is generating syntax errors in my AngularJS controller? $(".editRecur").focusin(function() { $(.recurBox).addClass("focus"); }).focusout(function() { $(.recurBox).removeClass("focus"); }); ...

Utilizing MVC 4: Transmitting Model Information through JSON to Embedded Partial with the Assistance of an Ajax Request

On my cshtml page, I am using a partial view. Within the same view, there is an ajax call that fetches json data from a different url. I want to pass this json data into the partial. What is the best way to accomplish this? ...

Addressing important problems post npm audit

I recently encountered some issues after running the npm audit command on a project that was just updated to angular 15. Upon inspection, the npm audit flagged a critical vulnerability related to hermes-engine with a fix available through the 'npm au ...