ionic-app-script任务:“构建” TypeError:无法读取未定义的属性“ getStart” TypeError:无法读取未定义的属性“ getStart”
试图更改JsxAttribute接口(从其中删除了所有代码),无法正常工作,尝试更新和降级tslint和Typescript,也无法正常工作。
这是我的Package.json
{
"name": "TransporterUI",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
},
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "^5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "^7.2.1",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@angular/router": "^7.2.1",
"@auth0/angular-jwt": "^2.1.0",
"@ionic-native/android-permissions": "^4.18.0",
"@ionic-native/core": "~4.17.0",
"@ionic-native/location-accuracy": "^4.18.0",
"@ionic-native/splash-screen": "~4.17.0",
"@ionic-native/status-bar": "~4.17.0",
"@ionic/angular": "^4.0.0",
"@ionic/storage": "^2.2.0",
"angular": "^1.7.6",
"angular2-jwt": "^0.2.3",
"cordova": "^8.1.2",
"cordova-android": "7.1.4",
"cordova-plugin-android-permissions": "1.0.0",
"cordova-plugin-camera": "4.0.3",
"cordova-plugin-console": "^1.1.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.1",
"cordova-plugin-permission": "^0.1.0",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-ext": "^2.3.0",
"cordova-sqlite-storage": "2.6.0",
"cordova.plugins.diagnostic": "4.0.10",
"ionic": "^4.8.0",
"ionic-angular": "^3.9.2",
"ionic-app-lib": "^2.2.1",
"ionicons": "3.0.0",
"latest": "^0.2.0",
"material-design-lite": "^1.3.0",
"npm": "^6.6.0",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"tslint": "^5.12.1",
"v1": "^1.0.0",
"zone.js": "0.8.26"
},
"devDependencies": {
"@ionic/app-scripts": "^3.2.2",
"typescript": "^3.2.4"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-android-permissions": {},
"cordova-plugin-camera": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-keyboard": {},
"cordova.plugins.diagnostic": {},
"cordova-sqlite-storage": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
}
},
"platforms": [
"android"
]
}
StackTrace:
[10:49:03] ionic-app-script任务:“构建” [10:49:03] TypeError:无法读取未定义的属性“ getStart” TypeError:无法读取未定义的属性“ getStart” 在Object.replaceNode(C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ util \ typescript-utils.js:34:27) 在Object.getUpdatedAppNgModuleContentWithDeepLinkConfig(C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ deep-linking \ util.js:267:31) 在C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ transpile.js:139:39 在新的Promise() 在transpileWorker(C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ transpile.js:107:12) 在Object.transpile(C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ transpile.js:64:12) 在C:\ Users \ Administrator \ Desktop \ ClientUI \ node_modules @ ionic \ app-scripts \ dist \ build.js:109:82 在 [ERROR]运行子流程ionic-app-scripts时发生错误。
漏洞的错误: npm WARN @ angular / animations @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / common @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / forms @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / http @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / platform-browser @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / platform-browser-dynamic @ 7.2.2需要一个对等体@ angular / core @ 7.2.2,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / router @ 7.2.1需要一个对等体@ angular / common @ 7.2.1,但没有安装。您必须自己安装对等依赖项。 npm WARN @ angular / router @ 7.2.1需要一个对等体@ angular / platform-browser @ 7.2.1,但没有安装。您必须自己安装对等依赖项。 npm WARN @ ionic / angular @ 4.0.0需要一个对等体@ angular-devkit / core @ ^ 7.2.1,但没有安装。您必须自己安装对等依赖项。 npm WARN @ ionic / angular @ 4.0.0需要一个对等体@ angular-devkit / schematics @ ^ 7.2.1,但没有安装。您必须自己安装对等依赖项。 npm WARN angular2-jwt@0.2.3需要一个对等体@ angular / core @ ^ 2.0.0 || ^ 4.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN angular2-jwt@0.2.3需要一个对等体@ angular / http @ ^ 2.0.0 || ^ 4.0.0,但未安装。您必须自己安装对等依赖项。 npm WARN angular2-jwt@0.2.3需要rxjs@^5.0.0的对等节点,但未安装。您必须自己安装对等依赖项。
增加了来自26个贡献者的67个软件包,并在33.915s中更新了1个软件包 修复了26104个扫描程序包中的136个漏洞中的2个 134个漏洞需要人工审核,无法更新
答案 0 :(得分:0)
似乎您的软件包版本依赖项不匹配,要解决此问题,您需要安装软件包的匹配版本或最新版本。
要轻松做到这一点,您可以使用npm check updates
运行:
npm i -g npm-check-updates # Install the package first
ncu # shows all the upgradable packages
ncu -u # To upgrade
npm install # update installed packages and package-lock.json
,并尝试先删除package-lock.json
以便重新安装新版本。
答案 1 :(得分:0)
实际上,离子模块中的App脚本有一个错误。我使用=> https://github.com/ionic-team/ionic-app-scripts.git将此App脚本进行了更改,但仍可以工作,谢谢。 ;)