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

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 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题