小阿阳啊 2022-01-18 15:03 采纳率: 100%
浏览 1625
已结题

node项目运行报错,如何解决?

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"
  }
}

求解答,谢谢!

  • 写回答

1条回答 默认 最新

  • 一只成序源 2022-01-18 15:12
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

问题事件

  • 系统已结题 2月16日
  • 已采纳回答 2月8日
  • 创建了问题 1月18日

悬赏问题

  • ¥15 利用决策森林为什么会出现这样·的问题(关键词-情感分析)
  • ¥15 DispatcherServlet.noHandlerFound No mapping found for HTTP request with URI[/untitled30_war_e
  • ¥15 使用deepspeed训练,发现想要训练的参数没有梯度
  • ¥15 寻找一块做为智能割草机的驱动板(标签-stm32|关键词-m3)
  • ¥15 信息管理系统的查找和排序
  • ¥15 基于STM32,电机驱动模块为L298N,四路运放电磁传感器,三轮智能小车电磁组电磁循迹(两个电机,一个万向轮),怎么用读取的电磁传感器信号表示小车所在的位置
  • ¥15 如何解决y_true和y_predict数据类型不匹配的问题(相关搜索:机器学习)
  • ¥15 PB中矩阵文本型数据的总计问题。
  • ¥15 MATLAB卫星二体模型仿真
  • ¥15 怎么让数码管亮的同时让led执行流水灯代码