【问题标题】:ctorParameters.map is not a funcion error on Ionic 2ctorParameters.map 不是 Ionic 2 中的函数错误
【发布时间】:2017-07-20 22:22:59
【问题描述】:

我想使用 Network-information plugin 并且我有一个旧的 ionic-native 版本。 所以我做了:

npm rm --save ionic native
npm install --save ionic-native@latest
npm update

因为2.2.12.中更改了网络信息插件

但是现在,当我这样做时:ionic serve --watch 控制台会抛出:ctorParameters.map 不是函数

我的 Ionic CLI 版本是:2.1.14

还有我的 package.json:

{
  "name": "ionic-hello-world",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "private": true,
  "scripts": {
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.1.1",
    "@angular/compiler": "2.1.1",
    "@angular/compiler-cli": "2.1.1",
    "@angular/core": "2.1.1",
    "@angular/forms": "2.1.1",
    "@angular/http": "2.1.1",
    "@angular/platform-browser": "2.1.1",
    "@angular/platform-browser-dynamic": "2.1.1",
    "@angular/platform-server": "2.1.1",
    "@ionic/storage": "^1.1.6",
    "angular2-fullcalendar": "^1.1.1",
    "angularfire2": "^2.0.0-beta.6-preview",
    "firebase": "^3.6.4",
    "ionic-angular": "2.0.0-rc.3",
    "ionic-native": "^2.5.1",
    "ionicons": "3.0.0",
    "jquery-ui": "^1.12.1",
    "rxjs": "5.0.0-beta.12",
    "soundcloud": "^3.1.2",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "0.0.45",
    "typescript": "2.0.6"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-statusbar",
    "cordova-plugin-console",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "description": "Mindfulness: An Ionic project"
}

有什么办法吗?

提前致谢!


编辑:

我已经尝试更新到 rc4:(2.0.0-rc.4 (2016-12-15))

我使用了更新的指南,然后控制台抛出了我:

A recent change occured in ionic-app-scripts.
Please create a new file "main.ts" containing the content of "main.dev.ts", and then delete  the deprecated files.

于是我搜索了一下,发现了这个issue 我做了这些步骤,然后当我这样做时:ionic serve --watch 它构建,但应用程序没有加载并且控制台抛出:

GET http://localhost:8100/build/main.css (index):33
GET http://localhost:8100/build/main.js (index):45
GET http://localhost:8100/build/main.js 404 (Not Found)(index):45 

【问题讨论】:

  • 您可能需要从一个全新的项目开始
  • 嗯,但问题是该应用程序已经在 Play 商店中发布,处于 alpha 版本。它有一个允许上传更新的唯一 ID。我也应该在 Play 商店中重新配置新应用吗?那么 git hub 存储库呢?

标签: cordova angular typescript npm ionic2


【解决方案1】:

已解决:https://github.com/driftyco/ionic/issues/10608

我在 ionic 2 存储库中打开了一个问题。

【讨论】:

    猜你喜欢
    • 2017-06-03
    • 2023-03-17
    • 1970-01-01
    • 2017-05-08
    • 2017-11-03
    • 1970-01-01
    • 1970-01-01
    • 2023-03-22
    • 2020-02-12
    相关资源
    最近更新 更多