【问题标题】:NPM packages version conflictNPM 包版本冲突
【发布时间】:2017-04-19 11:02:06
【问题描述】:

包版本混乱:

我是 NPM 的新手,一直在努力创建 ionic 2 应用程序。我不知道如何解决所有这些包版本冲突。在图片中显示的命令之前,我执行过:清理 node_modules、npm cache clean、npm unpdate -g npm 和 npm install。

这是我的 package.json:

 {
  "name": "io.cordova.myappb7116d",
  "author": "",
  "homepage": "",
  "private": true,
  "scripts": {
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "ionic:build": "ionic-app-scripts build",
    "ionic:serve": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/common": "2.2.1",
    "@angular/compiler": "2.2.1",
    "@angular/compiler-cli": "2.2.1",
    "@angular/core": "2.2.1",
    "@angular/forms": "2.2.1",
    "@angular/http": "2.2.1",
    "@angular/platform-browser": "2.2.1",
    "@angular/platform-browser-dynamic": "2.2.1",
    "@angular/platform-server": "2.2.1",
    "@ionic-native/core": "^3.1.0",
    "@ionic-native/http": "^3.4.4",
    "@ionic-native/native-storage": "^3.4.4",
    "ionic-angular": "2.0.0-rc.4",
    "ionic-native": "2.2.11",
    "ionicons": "3.0.0",
    "localforage-cordovasqlitedriver": "^1.6.0",
    "npm-install-version": "^6.0.1",
    "rxjs": "^5.0.1",
    "sw-toolbox": "^3.6.0",
    "uuid": "^3.0.1",
    "zone.js": "0.6.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.1.4",
    "typescript": "2.0.9"
  },
  "cordovaPlugins": [
    "cordova-plugin-whitelist",
    "cordova-plugin-console",
    "cordova-plugin-statusbar",
    "cordova-plugin-device",
    "cordova-plugin-splashscreen",
    "ionic-plugin-keyboard"
  ],
  "cordovaPlatforms": [],
  "-vs-binding": {
    "BeforeBuild": [
      "ionic:build"
    ]
  }
}

【问题讨论】:

  • 请将您的 package.json 添加到问题中...
  • 你还在 RC4 上,我建议你按照 ionic 在更新日志中所说的那样更新包 json,然后尝试全部安装

标签: node.js npm ionic2 rxjs


【解决方案1】:

我关注了Fernando's suggestion

您仍在使用 RC4,我建议您按照 ionic 在更改日志中的说明更新包 json,然后尝试全部安装

但实际上我到目前为止还没有手动编辑 package.json,我认为 npm 会在安装最新的可能包版本时管理版本冲突。

最终我编辑了 packages.json 以切换到最新的 ionic 版本here

之后我执行了npm install,错误消失了。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-21
    • 1970-01-01
    • 2017-06-28
    • 2023-03-23
    • 2019-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多