csantanapr / grunt-cordovacli

Wraps web app with Cordova CLI using GruntJS
Apache License 2.0
60 stars 31 forks source link

can't overwrite cordova-cli version #16

Closed didlich closed 9 years ago

didlich commented 9 years ago

in grunt-cordovacli@0.7.0 not able to overwrite cordova version like this:

{
  "name": "myproject",
  "version": "0.0.0",
  "dependencies": {    
    "grunt-cordovacli": {
      "version": "0.5.1",
      "from": "grunt-cordovacli@0.5.1",
      "dependencies": {
        "cordova": {
          "version": "3.5.0-0.2.7",
          "from": "cordova@>=3"
        }
      }
    }
  }
}

in package.json: "grunt-cordovacli": "0.7.0"

so I changed npm-shrinkwrap.json to:

{
  "name": "myproject",
  "version": "0.0.0",
  "dependencies": {    
    "grunt-cordovacli": {
      "version": "0.7.0",
      "from": "grunt-cordovacli@0.7.0",
      "dependencies": {
        "cordova": {
          "version": "4.1.2",
          "from": "cordova@4.2.0"
        }
      }
    }
  }
}

after npm install I get:

npm WARN package.json myproject@0.0.0 No repository field.
npm WARN prefer global cordova@4.1.2 should be installed with -g
npm WARN prefer global cca@0.5.1 should be installed with -g

> myproject@0.0.0 postinstall /home/test/git/myproject
> grunt githooks

Running "githooks:all" (githooks) task

Binding `jshint` to `pre-commit` Git hook.
OK

Done, without errors.
npm ERR! peerinvalid The package cordova does not satisfy its siblings' peerDependencies requirements!

npm ERR! System Linux 3.13.0-45-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /home/test/git/myproject
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/test/git/myproject/npm-debug.log
npm ERR! not ok code 0

I would like to use grunt-cordovacli but instead of cordova 4.2.0 I have to use 4.1.2. How can I do that now. In previous versions cordova was a "depedency", but now it's a "peerDependency".

mlegenhausen commented 9 years ago

+1

joelambert commented 9 years ago

+1

Would it be possible to make the peer dependency more lenient so its easier to keep in step with cordova patch releases?

kctang commented 9 years ago

+1. Same applies to cca's version.