1

帮助!我很绝望....无法解决这个问题。构建时出错,见下文。

ionic cordova:build platform android --debug
TypeError: Cannot read property 'private' of undefined
at inputs.filter (\node_modules\@ionic\cli-utils\dist\index.js:20826:31)
at Array.filter (native)
at BuildCommand.getCleanInputsForTelemetry (\node_modules\@ionic\cli-utils\dist\index.js:20825:18)
at BuildCommand. (\node_modules\@ionic\cli-utils\dist\index.js:20788:48)
at Generator.next ()
at fulfilled (\node_modules\@ionic\cli-utils\dist\index.js:20731:58)

我已经尝试更新不同的项目:

npm install -g cordova@latest
ionic platform update android@6.1.2
npm install @ionic/app-scripts@latest --save-dev

请帮忙!无法将我的应用程序投入生产!

问题:以前有没有人遇到过这个问题,并且知道如何解决这个问题?

4

1 回答 1

1

我会确保您拥有最新版本的 npm 和 node。

然后确保您拥有最新版本的 Ionic (2.2)

为此,您应该更新您的 package.json 文件..

"dependencies": {
"@angular/common": "2.4.8",
    "@angular/compiler": "2.4.8",
    "@angular/compiler-cli": "2.4.8",
    "@angular/core": "2.4.8",
    "@angular/forms": "2.4.8",
    "@angular/http": "2.4.8",
    "@angular/platform-browser": "2.4.8",
    "@angular/platform-browser-dynamic": "2.4.8",
    "@angular/platform-server": "2.4.8",
    "@ionic/storage": "2.0.0",
    "ionic-angular": "2.2.0",
    "ionic-native": "2.4.1",
    "ionicons": "3.0.0",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
},
"devDependencies": {
    "@ionic/app-scripts": "1.1.4",
    "typescript": "2.0.9"
}

然后删除你的 node_modules 目录,然后运行:

npm install(或者sudo npm install)

这应该会更新所有内容并希望能解决问题

于 2017-03-17T19:03:32.147 回答