Ember-cli-dependency-checker - 版本无效:*

时间:2016-09-11 09:23:53

标签: json ember.js dependencies ember-cli

我正在尝试升级项目的devDependencies并遇到此错误。 我无法弄清楚为什么我会收到这个错误。 它认为什么包无效?本身? 我是否必须查看每个package.json?

[folatt@ArkOS_Dev genesis]$ sudo ember update
Invalid Version: *
TypeError: Invalid Version: *
    at new SemVer (/home/folatt/workspace/arkos/genesis/node_modules/semver/semver.js:295:11)
    at Range.test (/home/folatt/workspace/arkos/genesis/node_modules/semver/semver.js:1049:15)
    at Function.satisfies (/home/folatt/workspace/arkos/genesis/node_modules/semver/semver.js:1098:16)
    at Function.VersionChecker.satisfies (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/version-checker.js:31:17)
    at Package.updateRequired (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/package.js:21:26)
    at Package.init (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/package.js:15:27)
    at new Package (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/package.js:4:13)
    at EmberCLIDependencyChecker.<anonymous> (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/dependency-checker.js:126:12)
    at Array.map (native)
    at EmberCLIDependencyChecker.readDependencies (/home/folatt/workspace/arkos/genesis/node_modules/ember-cli-dependency-checker/lib/dependency-checker.js:122:36)

的package.json

{
  "author": "arkOS",
  "description": "Web management frontend for arkOS servers",
  "devDependencies": {
    "broccoli-asset-rev": "^2.4.6",
    "broccoli-funnel": "^1.0.6",
    "ember-ajax": "^2.0.1",
    "ember-cli": "^2.7.0",
    "ember-cli-app-version": "^1.0.0",
    "ember-cli-babel": "^5.1.6",
    "ember-cli-content-security-policy": "^0.5.0",
    "ember-cli-dependency-checker": "^1.3.0",
    "ember-cli-htmlbars": "^1.0.1",
    "ember-cli-htmlbars-inline-precompile": "^0.3.1",
    "ember-cli-ic-ajax": "0.2.5",
    "ember-cli-inject-live-reload": "^1.4.0",
    "ember-cli-jshint": "^1.0.5",
    "ember-cli-qunit": "^3.0.0",
    "ember-cli-release": "^0.2.9",
    "ember-cli-selectize": "^0.5.5",
    "ember-cli-sri": "^2.1.0",
    "ember-cli-uglify": "^1.2.0",
    "ember-data": "^2.7.0",
    "ember-export-application-global": "^1.0.4",
    "ember-load-initializers": "^0.5.1",
    "ember-resolver": "^2.1.0",
    "ember-uploader": "^1.1.0",
    "ember-welcome-page": "^1.0.3",
    "loader.js": "^4.0.11"
  },
  "directories": {
  "doc": "doc",
  "test": "tests"
  },
  "ember-addon": {
    "paths": [
      "lib/basicsite",
      "lib/jekyll",
      "lib/owncloud",
      "lib/radicale",
      "lib/wallabag",
      "lib/xmpp",
      "lib/cmsjs",
      "lib/duniter"
    ]
  },
  "engines": {
    "node": ">= 0.10.0"
  },
  "license": "GPLv3",
  "name": "genesis",
  "private": true,
  "repository": "",
  "scripts": {
    "build": "ember build",
    "start": "ember server",
    "test": "ember test"
  },
  "version": "0.8.0"
}

bower.json

{
  "name": "genesis",
  "dependencies": {
    "bootstrap": "^3.3.7",
    "codemirror": "^5.18.2",
    "ember": "^2.7.2",
    "ember-cli-shims": "^0.1.3",
    "ember-load-initializers": "^0.5.1",
    "ember-qunit-builds": "^1.0.0-beta.1",
    "ember-qunit-notifications": "^0.1.0",
    "font-awesome": "^4.6.3",
    "jquery": "^2.2.4",
    "jQuery-contextMenu": "^2.2.4",
    "lightbox2": "^2.8.2",
    "loader.js": "^4.0.11",
    "moment": "^2.14.1",
    "mozilla-fira": "4.202",
    "multiselect": "^0.9.12",
    "qunit": "^2.0.1",
    "selectize": "^0.12.3"
  }
}

bower install -force的结果 http://pastebin.com/raw/zeiLdpAA

2 个答案:

答案 0 :(得分:5)

试试这个解决方案

<强>设置

1- npm uninstall -g ember-cli - 删除旧的全局ember-cli

2- npm cache clean&amp; bower cache clean - 清除缓存

3- npm install -g ember-cli@2.9.0-beta.1 - 安装新的全局ember-cli

项目更新

1- rm -rf node_modules bower_components dist tmp - 删除临时开发文件夹。

2- npm install --save-dev ember-cli@2.9.0-beta.1 - 更新项目的package.json以使用最新版本。 [您可以将@ 2.9 ...更改为@ 2.8.0]

3- npm install&amp; bower install - 重新安装依赖项。

它对我有用,我希望它可以帮到你。

答案 1 :(得分:0)

我发现它是ember后面的1个主要版本后删除了ember-cli-dependency-checker。 然后我修剪了(sudo npm prune)项目依赖项并再次尝试ember build