当我尝试通过 Visual Studio 2015 构建我的项目时,我遇到了这些奇怪的错误,我在互联网上搜索了很多东西并尝试了很多东西,但没有运气。谁能帮我解决这个问题
错误 TS2307 构建:找不到模块“./router_preloader”。GLD.CMS.SOA.WebCli C:\TFS\ICTDevelopment\NET\GLD.CMS.SOA\GLD.CMS.SOA.WebCli\node_modules\@angular\router\src\router_module.d.ts 13
错误 TS2430 构建:接口“NodeBuffer”错误地扩展了接口“Uint8Array”。GLD.CMS.SOA.WebCli C:\TFS\ICTDevelopment\NET\GLD.CMS.SOA\GLD.CMS.SOA.WebCli\typings\globals\node\index.d.ts 415
错误 TS2307 找不到模块“./util/lang”。TypeScript 虚拟项目 C:\TFS\ICTDevelopment\NET\GLD.CMS.SOA\GLD.CMS.SOA.WebCli\node_modules\@angular\core\src\core_private_export.d.ts 38 活动
错误 TS2307 找不到模块“./router_preloader”。C:\TFS\ICTDevelopment\NET\GLD.CMS.SOA\GLD.CMS.SOA.WebCli\node_modules\@angular\router\src\index.d.ts 16 活动
错误 TS2307 找不到模块“./router_preloader”。TS2430 接口“NodeBuffer”错误地扩展了接口“Uint8Array”。属性“填充”的类型不兼容。类型 '(value: any, offset?: number, end?: number) => Buffer' 不可分配给类型 '(value: number, start?: number, end?: number) => this'。类型“缓冲区”不可分配给类型“this”。TypeScript 虚拟项目 C:\TFS\ICTDevelopment\NET\GLD.CMS.SOA\GLD.CMS.SOA.WebCli\typings\globals\node\index.d.ts 415 活动
我的 tsconfig 文件
{
"compileOnSave": true,
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"moduleResolution": "node",
"noEmitOnError": true,
"noImplicitAny": false,
"removeComments": false,
"sourceMap": true,
"target": "es5",
"outDir": "wwwroot/app"
},
"exclude": [
"node_modules",
"typings/main.d.ts",
"typings/main"
]
}
包.json
{
"name": "gld-soa",
"version": "1.0.0",
"scripts": {
"postinstall": "typings install",
"tsc": "tsc",
"tsc:w": "tsc -w",
"lite": "lite-server",
"typings": "typings",
"start": "tsc && concurrently \"tsc -w\" \"lite-server\" "
},
"license": "ISC",
"dependencies": {
"@angular/common": "~2.1.0",
"@angular/compiler": "~2.1.0",
"@angular/core": "~2.1.0",
"@angular/forms": "~2.1.0",
"@angular/http": "~2.1.0",
"@angular/platform-browser": "~2.1.0",
"@angular/platform-browser-dynamic": "~2.1.0",
"@angular/router": "~3.1.0",
"@angular/upgrade": "~2.1.0",
"core-js": "^2.4.1",
"es6-shim": "^0.35.1",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.0-beta.12",
"systemjs": "0.19.39",
"zone.js": "^0.6.25",
"angular-in-memory-web-api": "~0.1.5",
"bootstrap": "^3.3.7",
"primeng": "^1.0.0-beta.17"
},
"devDependencies": {
"concurrently": "^3.0.0",
"gulp": "^3.9.1",
"gulp-concat": "^2.6.0",
"gulp-cssmin": "^0.1.7",
"gulp-uglify": "^1.5.3",
"gulp-util": "^3.0.7",
"gulp-rename": "^1.2.2",
"lite-server": "^2.2.2",
"typescript": "2.0.3",
"typings": "^1.4.0",
"rimraf": "2.2.8",
"lodash": "^4.13.1"
}
}