gpt4 book ai didi

angular - 升级到 native 脚本 8.1.5 后出现节点模块问题

转载 作者:行者123 更新时间:2023-12-05 05:48:37 29 4
gpt4 key购买 nike

我已经升级了我的原生脚本项目,它在以前的版本上运行良好。升级到8.1.5后,节点模块报错。

我的包.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.

最佳答案

您没有提到您从哪个版本的 nativescript 升级,但是在迁移您的 nativescript 项目时,您必须根据此 nativescript migration guide to NS6 手动修改您的代码, migration 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";

关于angular - 升级到 native 脚本 8.1.5 后出现节点模块问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70781736/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com