[英]Why I am getting these Typescript compile time errors?
I dont have any idea why these errors are appearing, while I copied the whole ClientApp folder from running application where these are not there. 我不知道为什么会出现这些错误,而我是从运行应用程序的地方复制了整个ClientApp文件夹,而这些地方却不存在。
My structure of project is ; 我的项目结构是;
Here is my package.json : 这是我的package.json:
{
"name": "crossvertise-calander-system",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^7.1.0",
"@angular/cdk": "^7.1.0",
"@angular/common": "^7.1.0",
"@angular/compiler": "^7.1.0",
"@angular/core": "^7.1.0",
"@angular/forms": "^7.1.0",
"@angular/material": "^7.1.0",
"@angular/platform-browser": "^7.1.0",
"@angular/platform-browser-dynamic": "^7.1.0",
"@angular/router": "^7.1.0",
"core-js": "^2.5.7",
"rxjs": "^6.3.3",
"saturn-datepicker": "^7.0.1",
"@angular/http": "7.1.4",
"@ng-bootstrap/ng-bootstrap": "4.0.1",
"bootstrap": "4.1.3",
"hammerjs": "^2.0.8",
"jquery": "^3.3.1",
"md-date-range-picker": "^0.8.3",
"ng2-daterange-picker": "^1.1.0",
"ngx-mat-daterange-picker": "0.0.2",
"rxjs-compat": "^6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26",
"@mat-datetimepicker/core": "3.0.0-beta.0",
"@mat-datetimepicker/moment": "3.0.0-beta.0"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "~7.1.3",
"@angular/compiler-cli": "~7.1.0",
"@angular/language-service": "~7.1.0",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"@types/jquery": "^3.3.27",
"@types/node": "~8.9.4",
"codelyzer": "~4.5.0",
"jasmine-core": "~2.99.1",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~1.1.2",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.1.6"
}
}
Can any body help me how to get rid of these errors. 任何机构都可以帮助我如何摆脱这些错误。 I dont know how to avoid these errors. 我不知道如何避免这些错误。 These are really slowing down my development 这些真的减慢了我的发展速度
Follow the below steps: 请按照以下步骤操作:
node_modules
folder and package-lock.json
file if it exists 删除您的node_modules
文件夹和package-lock.json
文件(如果存在) npm install
command 运行npm install
命令 If this, still doesn't fix your problem, then in your spec.ts
file, add the below import: 如果这样,仍然不能解决您的问题,请在spec.ts
文件中添加以下导入:
import {} from 'jasmine';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.