【问题标题】:Having Node module issue after upgrade to native script 8.1.5升级到本机脚本 8.1.5 后出现 Node 模块问题
【发布时间】:2022-01-21 03:37:12
【问题描述】:

我已经升级了在以前版本上运行良好的本机脚本项目。 升级到 8.1.5 后,出现节点模块错误。

我的 package.json

{
  "description": "Order Next Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "repository": "<fill-your-repository-here>",
  "dependencies": {
    "@angular-devkit/build-angular": "^13.1.2",
    "@angular/animations": "^13.1.1",
    "@angular/cli": "^13.1.2",
    "@angular/common": "^13.1.1",
    "@angular/compiler": "^13.1.1",
    "@angular/core": "^13.1.1",
    "@angular/forms": "^13.1.1",
    "@angular/http": "^7.2.16",
    "@angular/platform-browser": "^13.1.1",
    "@angular/platform-browser-dynamic": "^13.1.1",
    "@angular/router": "^13.1.1",
    "@nativescript/angular": "^13.0.1",
    "@nativescript/core": "^8.1.5",
    "@nativescript/firebase": "^11.1.3",
    "@ngtools/webpack": "^13.1.2",
    "@nstudio/nativescript-checkbox": "^2.0.4",
    "@nstudio/nativescript-loading-indicator": "^3.0.1",
    "@types/node": "^17.0.9",
    "font-awesome": "^4.7.0",
    "nativescript-accordion": "^5.0.4",
    "nativescript-drop-down": "^5.0.6",
    "nativescript-feedback": "^2.0.0",
    "nativescript-geolocation": "^5.1.0",
    "nativescript-iqkeyboardmanager": "^1.5.1",
    "nativescript-phone": "^1.4.0",
    "nativescript-ratings": "^1.0.1",
    "nativescript-ripple": "^4.0.1",
    "nativescript-screen-orientation": "^1.0.0",
    "nativescript-theme-core": "~1.0.4",
    "nativescript-ui-listview": "^10.0.2",
    "nativescript-youtubeplayer": "^3.0.1",
    "reflect-metadata": "~0.1.10",
    "rxjs": "~7.3.0",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular/compiler-cli": "^13.1.1",
    "@nativescript/android": "8.1.1",
    "@nativescript/schematics": "~0.4.0",
    "@nativescript/types": "^8.1.1",
    "@nativescript/webpack": "^5.0.4",
    "typescript": "^4.5.4"
  },
  "readme": "NativeScript Application",
  "main": "./src/main.ts"
}

我从依赖项中收到以下错误,

Click here to see error image

Kindly help me with the solution.

【问题讨论】:

    标签: angular plugins dependencies nativescript node-modules


    【解决方案1】:

    您没有提及您从哪个版本的nativescript 升级,但是在迁移您的nativescript 项目时,您必须根据此nativescript migration guide to NS6migration guide to NS7migration guide to NS8 手动修改您的代码。

    确保遵循所有步骤,对代码应用所需的更改,包括运行ns migrate

    但是,在您提供的示例中,您似乎没有更新导入以匹配 Angular 13 和 Nativescript 8。将导入更改为以下内容,您应该没问题:

    import { View, ObservableArray, CoercibleProperty, EventData, Property } from '@nativescript/core';
    import { BaseValueAccessor } from "@nativescript/angular";
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-29
      相关资源
      最近更新 更多