首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >在更新角8到9时../node_modules/@types/jquery/index.d.ts:8143:87中的生成错误

在更新角8到9时../node_modules/@types/jquery/index.d.ts:8143:87中的生成错误
EN

Stack Overflow用户
提问于 2020-04-07 13:37:25
回答 2查看 1.1K关注 0票数 0

我已经升级了一个应用程序从角8到9版本。当我进行构建时,得到以下生成错误

构建命令: ng build --base-href /test/ --查看,ng build -base-href /test/ -prod

Package.json

代码语言:javascript
运行
复制
{
  "name": "test",
  "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": "^9.1.0",
    "@angular/common": "^9.1.0",
    "@angular/compiler": "^9.1.0",
    "@angular/core": "^9.1.0",
    "@angular/forms": "^9.1.0",
    "@angular/http": "^7.2.15",
    "@angular/localize": "^9.1.0",
    "@angular/platform-browser": "^9.1.0",
    "@angular/platform-browser-dynamic": "^9.1.0",
    "@angular/router": "^9.1.0",
    "@ng-bootstrap/ng-bootstrap": "^4.2.2",
    "@types/html2canvas": "0.0.33",
    "core-js": "^2.5.4",
    "html2canvas": "^1.0.0-alpha.12",
    "rxjs": "^6.5.5",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.803.12",
    "@angular/cli": "^9.1.0",
    "@angular/compiler-cli": "^9.1.0",
    "@angular/language-service": "^9.1.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^4.4.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^6.0.0",
    "ts-node": "~5.0.1",
    "tslint": "~5.9.1",
    "typescript": "~3.8.3"
  }
}

tsconfig.json

代码语言:javascript
运行
复制
{
  "compileOnSave": false,
  "compilerOptions": {
    "baseUrl": "./",
    "downlevelIteration": true,
    "module": "esnext",
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "target": "es2015",
    "typeRoots": [
      "node_modules/@types"
    ],
    "lib": [
      "es2017",
      "dom"
    ]
  }
}

角cli版本: 9.1.0,节点js版本: 12.16.1

我无法构建这个应用程序,我也尝试删除node_modules文件夹并执行npm安装,但是得到了相同的错误。不知道我错过了什么,谁能帮帮吗?

EN

Stack Overflow用户

回答已采纳

发布于 2020-04-07 13:46:23

  1. 尝试过在tsconfig中的compilerOptions中将"skipLibCheck“设置为true吗?
  2. 尝试将您的类型记录包降级为3.5.3

版本

票数 2
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61081320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档