daterangepicker.comcomponent.d.ts:error不能在环境上下文中声明访问器



我的英语很差,我在用节拍、棱角分明的材料做引导,但我有这个问题node_modules/ngx daterangepicker material/daterangepicker.component.d.ts(59,9(中存在错误:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.component.d.ts(60,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.component.d.ts(62,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.component.d.ts(63,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(55,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(56,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(59,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(60,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(62,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/daterangepicker.derective.d.ts(63,9(:错误TS1086:无法在环境上下文中声明访问器。node_modules/ngx daterangepicker material/locae.service.d.ts(5,9(:错误TS1086:无法在环境上下文中声明访问器。我的package.json

{
"name": "metronic-angular",
"version": "6.1.8",
"description": "Packages used by Angular",
"scripts": {
"ng": "ng",
"start": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve",
"build": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
"bundle-report": "webpack-bundle-analyzer dist/stats.json",
"rtl": "webpack"
},
"private": true,
"dependencies": {
"@angular/animations": "^8.2.14",
"@angular/cdk": "^8.2.3",
"@angular/common": "^8.2.14",
"@angular/compiler": "^8.2.14",
"@angular/core": "^8.2.14",
"@angular/forms": "^8.2.14",
"@angular/platform-browser": "^8.2.14",
"@angular/platform-browser-dynamic": "^8.2.14",
"@angular/platform-server": "^8.2.14",
"@angular/router": "^8.2.14",
"@fortawesome/fontawesome-free": "^5.12.0",
"@ng-bootstrap/ng-bootstrap": "^5.1.5",
"@ngrx/effects": "^8.6.0",
"@ngrx/entity": "^8.6.0",
"@ngrx/router-store": "^8.6.0",
"@ngrx/store": "^8.6.0",
"@ngrx/store-devtools": "^8.6.0",
"@ngx-loading-bar/core": "^4.2.0",
"@ngx-translate/core": "^11.0.1",
"@types/lodash": "^4.14.149",
"angular-in-memory-web-api": "^0.8.0",
"bootstrap": "^4.4.1",
"chart.js": "^2.9.3",
"chartist": "^0.11.4",
"classlist.js": "^1.1.20150312",
"core-js": "^3.6.2",
"hammerjs": "^2.0.8",
"highlight.js": "^9.17.1",
"lodash": "^4.17.11",
"material-design-icons": "^3.0.1",
"moment": "^2.24.0",
"ng-inline-svg": "^9.2.2",
"ngrx-store-freeze": "^0.2.4",
"ngx-clipboard": "^12.3.0",
"ngx-daterangepicker-material": "^2.1.11",
"ngx-highlightjs": "^3.0.3",
"ngx-perfect-scrollbar": "^8.0.0",
"ngx-permissions": "^7.0.3",
"object-path": "^0.11.4",
"perfect-scrollbar": "^1.4.0",
"popper.js": "^1.16.0",
"rxjs": "^6.5.4",
"socicon": "^3.0.5",
"tooltip.js": "^1.3.3",
"tslib": "^1.10.0",
"web-animations-js": "^2.3.2",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.6",
"@angular/cli": "^8.3.22",
"@angular/compiler-cli": "^8.2.14",
"@angular/language-service": "^8.2.14",
"@angular/material": "^8.2.3",
"@angular/material-moment-adapter": "^8.2.3",
"@ngrx/schematics": "^8.6.0",
"@types/chartist": "^0.9.46",
"@types/highlight.js": "^9.12.3",
"@types/jasmine": "^3.5.0",
"@types/jasminewd2": "^2.0.8",
"@types/node": "^12.12.24",
"@types/object-path": "^0.11.0",
"codelyzer": "^5.2.1",
"css-loader": "^3.4.1",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^4.4.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "^2.1.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.1",
"node-sass": "^4.13.0",
"protractor": "~5.4.2",
"ts-node": "~8.2.0",
"tslint": "~5.17.0",
"typescript": "~3.4.5",
"webpack-bundle-analyzer": "^3.6.0",
"webpack-cli": "^3.3.10",
"webpack-messages": "^2.0.4",
"webpack-rtl-plugin": "^2.0.0"
}

}节点-vv12.16.3npm-v6.14.4我的角度型Angular CLI:9.1.4节点:12.16.3操作系统:linux x64

Angular: 
... 
Ivy Workspace: 
Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.901.4
@angular-devkit/core         9.1.4
@angular-devkit/schematics   9.1.4
@schematics/angular          9.1.4
@schematics/update           0.901.4
rxjs                         6.5.4

我尝试更改版本ngx日期范围选择器材质":"^2.1.11"=>2.1.9但不起作用。

对于metronic-angular 6.1.8,我花了8个小时,但我解决了。

rm package-lock.json
rm -r node_modules
npm install

当您执行ng serve并收到TS1086 error

请尝试以下操作并重新启动:

npm i ngx-daterangepicker-material@2.2.0
npm i moment@2.18.1

重新启动ng serve

相关内容

  • 没有找到相关文章

最新更新