node项目运行时报错,报错信息如下:
Debugger attached.
> orderreconciliation@0.0.0 start
> ng serve
Debugger attached.
(node:19444) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **
0% compilingDebugger attached.
11% building modules 9/12 modules 3 active ...5.0.9\laydate\theme\default\laydate.cssBrowserslist: caniuse-lite is outdated. Please run next command `npm update`
Date: 2022-01-18T06:55:30.534Z
Hash: f198538fb4fe3bf85c33
Time: 13550ms
chunk {main} main.js, main.js.map (main) 1.94 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 93.3 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 6.08 kB [entry] [rendered]
chunk {scripts} scripts.js, scripts.js.map (scripts) 26.4 kB [rendered]
chunk {styles} styles.js, styles.js.map (styles) 41.5 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 327 kB [initial] [rendered]
ERROR in node_modules/@ngx-translate/core/lib/translate.directive.d.ts(14,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.directive.d.ts(15,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(49,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(56,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(63,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(67,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(68,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(72,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(73,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(77,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(78,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(82,9): error TS1086: An accessor cannot be declared in an ambient context.
node_modules/@ngx-translate/core/lib/translate.service.d.ts(83,9): error TS1086: An accessor cannot be declared in an ambient context.
下面这部分是我的package.json
{
"name": "orderreconciliation",
"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/common": "~7.1.0",
"@angular/compiler": "~7.1.0",
"@angular/core": "~7.1.0",
"@angular/forms": "~7.1.0",
"@angular/platform-browser": "~7.1.0",
"@angular/platform-browser-dynamic": "~7.1.0",
"@angular/router": "~7.1.0",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"@types/jquery": "^3.5.1",
"core-js": "^2.5.4",
"ngx-loading": "^8.0.0",
"rxjs": "~6.3.3",
"tslib": "^1.9.0",
"zone.js": "~0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.11.0",
"@angular/cli": "~7.1.4",
"@angular/compiler-cli": "~7.1.0",
"@angular/language-service": "~7.1.0",
"@types/node": "~8.9.4",
"@types/jasmine": "~2.8.8",
"@types/jasminewd2": "~2.0.3",
"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"
}
}
求解答,谢谢!