带有angularjs npm的Sailsjs安装错误

时间:2015-06-03 12:29:54

标签: angularjs gruntjs npm sails.js

我正在使用sails js后端和前端angularjs。我给了npm安装。 npm安装包 显示此错误:

npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-contrib-clean@0.6.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-coffee@0.13.0 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-concat@0.5.1 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-copy@0.8.0 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-cssmin@0.12.3 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-jst@0.6.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-less@0.11.1 wants grunt@^0.4.0
npm ERR! peerinvalid Peer grunt-contrib-requirejs@0.4.4 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-sass@0.9.2 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-uglify@0.9.1 wants grunt@>=0.4.0
npm ERR! peerinvalid Peer grunt-contrib-watch@0.6.1 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-html2js@0.3.2 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-ng-annotate@1.0.1 wants grunt@~0.4.5

packagejson文件:

  "dependencies": {
    "ejs": "~0.8.4",
    "fs-extra": "^0.12.0",
    "grunt": "0.4.2",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-coffee": "~0.10.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-copy": "~0.5.0",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-contrib-jst": "~0.6.0",
    "grunt-contrib-less": "0.11.1",
    "grunt-contrib-requirejs": "^0.4.4",
    "grunt-contrib-sass": "^0.8.1",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-html2js": "^0.2.9",
    "grunt-ng-annotate": "*",
    "grunt-sails-linker": "~0.9.5",
    "grunt-sync": "~0.0.4",
    "include-all": "~0.1.3",
    "lodash": "^2.4.1",
    "rc": "~0.5.0",
    "sails": "~0.10.5",
    "sails-disk": "~0.10.0"
  },

如何解决?谁能帮我?

1 个答案:

答案 0 :(得分:1)

似乎你的grunt-ng-annotate需要至少0.4.5 grunt你有0.4.2尝试手动更改package.json中的版本。它应该工作。

试试这个:

"dependencies": {
    "ejs": "~0.8.4",
    "fs-extra": "^0.12.0",
    "grunt": "0.4.5",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-coffee": "~0.10.1",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-copy": "~0.5.0",
    "grunt-contrib-cssmin": "~0.9.0",
    "grunt-contrib-jst": "~0.6.0",
    "grunt-contrib-less": "0.11.1",
    "grunt-contrib-requirejs": "^0.4.4",
    "grunt-contrib-sass": "^0.8.1",
    "grunt-contrib-uglify": "~0.4.0",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-html2js": "^0.2.9",
    "grunt-ng-annotate": "*",
    "grunt-sails-linker": "~0.9.5",
    "grunt-sync": "~0.0.4",
    "include-all": "~0.1.3",
    "lodash": "^2.4.1",
    "rc": "~0.5.0",
    "sails": "~0.10.5",
    "sails-disk": "~0.10.0"
  },