nativescrip error after migrate: Error: The target entry-point "chart-directives" has missing dependencies

nativescrip error after migrate: Error: The target entry-point "chart-directives" has missing dependencies

在我迁移项目后出现错误

webpack is watching the files... Compiling @angular/core : module as esm2015 Compiling @angular/animations : module as esm2015 Compiling @angular/animations/browser : module as esm2015 Compiling @angular/common : module as esm2015 Compiling @angular/platform-browser : module as esm2015 Compiling @angular/router : module as esm2015 Compiling @angular/common/http : module as esm2015 Compiling @angular/platform-browser/animations : module as esm2015 Compiling @angular/forms : module as esm2015 Compiling @nativescript/angular : module as esm2015 C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40 throw new Error("The target entry-point "" + invalidTarget.entryPoint.name + "" has missing dependencies:\n" + ^

Error: The target entry-point "chart-directives" has missing dependencies:

  • nativescript-angular/element-registry

  • ./../

  • tns-core-modules/data/observable-array

  • tns-core-modules/ui/core/view

  • tns-core-modules/data/observable

  • tns-core-modules/color

    at TargetedEntryPointFinder.findEntryPoints (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40:23) at C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\execution\analyze_entry_points.js:29:41 at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:28:29) at C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:59 at SyncLocker.lock (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\locking\sync_locker.js:34:24) at SingleProcessExecutorSync.execute (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:27) at Object.mainNgcc (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\src\main.js:74:25) at Object.process (C:\Users\nova\Projects\petropagolite_app\node_modules@angular\compiler-cli\ngcc\index.js:29:23) at NgccProcessor.processModule (C:\Users\nova\Projects\petropagolite_app\node_modules@ngtools\webpack\src\ngcc_processor.js:175:16) at C:\Users\nova\Projects\petropagolite_app\node_modules@ngtools\webpack\src\ivy\host.js:146:18 at C:\Users\nova\Projects\petropagolite_app\node_modules@ngtools\webpack\src\ivy\host.js:76:24 at Array.map () at Object.host.resolveModuleNames (C:\Users\nova\Projects\petropagolite_app\node_modules@ngtools\webpack\src\ivy\host.js:74:32) at actualResolveModuleNamesWorker (C:\Users\nova\Projects\petropagolite_app\node_modules\typescript\lib\typescript.js:109497:133) at resolveModuleNamesWorker (C:\Users\nova\Projects\petropagolite_app\node_modules\typescript\lib\typescript.js:109760:26) at resolveModuleNamesReusingOldState (C:\Users\nova\Projects\petropagolite_app\node_modules\typescript\lib\typescript.js:109857:24) Executing webpack failed with exit code 1.

我的包裹json是:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular/animations": "^12.2.5",
    "@angular/common": "^12.2.5",
    "@angular/compiler": "^12.2.5",
    "@angular/core": "^12.2.5",
    "@angular/forms": "^12.2.5",
    "@angular/platform-browser": "^12.2.5",
    "@angular/platform-browser-dynamic": "^12.2.5",
    "@angular/router": "^12.2.5",
    "@nativescript/imagepicker": "^1.0.5",
    "@types/node": "7.0.7",
    "@types/openpgp": "^4.4.7",
    "base-64": "^0.1.0",
    "from-exponential": "^1.0.0",
    "moment": "^2.24.0",
    "nativescript-barcodescanner": "^3.4.2",
    "nativescript-checkbox": "^3.0.3",
    "nativescript-exit": "^1.0.1",
    "nativescript-feedback": "^1.3.12",
    "nativescript-fingerprint-auth": "^7.0.2",
    "nativescript-input-mask": "^1.0.5",
    "nativescript-masked-text-field": "^4.0.3",
    "nativescript-permissions": "^1.3.11",
    "nativescript-theme-core": "~1.0.6",
    "nativescript-qr-generator": "^2.0.0",
    "nativescript-ui-autocomplete": "^6.0.0",
    "nativescript-ui-chart": "^7.1.0",
    "nativescript-webview-interface": "^1.4.4",
    "nativescript-zxing": "^1.5.9",
    "openpgp": "github:mohammadrafigh/nativescript-openpgpjs#openpgp2",
    "reflect-metadata": "~0.1.12",
    "rxjs": "~7.3.0",
    "zone.js": "~0.11.4",
    "@nativescript/core": "~8.1.1",
    "@nativescript/angular": "^12.2.0"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^12.2.5",
    "@nativescript/schematics": "^0.7.3",
    "@ngtools/webpack": "^12.2.5",
    "@types/node": "^11.15.20",
    "typescript": "~4.3.5",
    "@nativescript/webpack": "~5.0.0",
    "@nativescript/android": "~8.1.1"
  },
  "gitHead": "1964ea9e8ca1a0518e0d6370781eedcf6c23db42",
  "readme": "NativeScript Application",
  "main": "./src/main.ts"
}

我不知道该怎么做,非常感谢任何能帮助我的人

看起来至少有一个 NativeScript 插件依赖项与 NativeScript 7/8 不兼容,因为它正在寻找像 tns-core-modules 这样的旧版 v6 导入。尝试:

"nativescript-ui-chart": "^9.0.0",

如果您 运行 遇到更多类似的错误,请确保将所有 nativescript 插件依赖项更新到最新版本。