在IntelliJ-Idea 2017.1.1中获取TypeScript错误IDE编译时出现Typescript初始化错误
我尝试启用JavaScript,NodeJS和TypeScript Compiler。
我已经尝试了一切,但没有得到解决,我可能会错过某处。
Error: Initialisation error (typescript). Cannot read property 'createHash of undefined
任何人都可以帮我解决吗?
的package.json
{
"name": "TempPractice",
"version": "0.0.1",
"description": "First Angular App",
"license": "MIT",
"repository": {
"type": "git",
"url": "[email protected]: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(/\\/\\/@@[email protected]@[\\s\\S]*\\/\\/@@[email protected]@/).join('//@@[email protected]@\\n'+loaderText+' //@@[email protected]@');fs.writeFileSync(indexFile,indexText);\""
},
"dependencies": {
"@angular/common": "^4.4.4",
"@angular/compiler": "^4.4.4",
"@angular/core": "^4.4.4",
"@angular/forms": "^4.4.4",
"@angular/http": "^4.4.4",
"@angular/platform-browser": "^4.4.4",
"@angular/platform-browser-dynamic": "^4.4.4",
"@angular/router": "^4.4.4",
"angular-in-memory-web-api": "^0.5.0",
"angular-route": "^1.6.6",
"bootstrap": "^3.3.7",
"font-awesome": "^4.7.0",
"rxjs": "^5.4.3",
"ts-node": "^3.3.0",
"typescript": "^2.5.3",
"typings": "^2.1.1",
"zone.js": "^0.8.18"
}
}
tsconfig.json
{
"compilerOptions": {
"module": "system",
"removeComments": true,
"preserveConstEnums": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"sourceMap": true,
"inlineSources": true,
"target": "es5"
},
"compileOnSave": false,
// Points folders and file to exclude
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
]
}
typings.json
{
"ambientDependencies": {
"es6-shim": "github:DefinitelyTyped/DefinitelyTyped/es6-shim/es6-shim.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd",
"jasmine": "github:DefinitelyTyped/DefinitelyTyped/jasmine/jasmine.d.ts#7de6c3dd94feaeb21f20054b9f30d5dabc5efabd"
}
}
'InitialiSation error'这似乎不是一个真正的错误。你究竟在何时何地观察到这个错误? –
当我创建main.ts文件 –
或任何TypeScript文件 –