使用最新 CLI 构建离子 2 应用程序时出错



救命!我绝望了...无法解决此问题。构建时出错,见下文。

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

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

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

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

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

我会确保你有最新版本的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 安装(或者可能是 sudo npm 安装(

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

相关内容

  • 没有找到相关文章

最新更新