Gruntjs OSX上的npm安装失败

Gruntjs OSX上的npm安装失败,gruntjs,npm,Gruntjs,Npm,我有现有项目“my_project”&无法使用npm安装在本地安装依赖项。 在package.json中: $ npm list --depth=0 my_project@1.0.0 /Users/user/www/my_project ├── bower@1.3.9 ├── grunt@0.4.5 peer invalid ├── grunt-autoprefixer@0.8.1 ├── grunt-cache-bust@0.3.9 ├── grunt-contrib-clean@0.5.0

我有现有项目“my_project”&无法使用npm安装在本地安装依赖项。 在package.json中:

$ npm list --depth=0
my_project@1.0.0 /Users/user/www/my_project
├── bower@1.3.9
├── grunt@0.4.5 peer invalid
├── grunt-autoprefixer@0.8.1
├── grunt-cache-bust@0.3.9
├── grunt-contrib-clean@0.5.0
├── grunt-contrib-compass@0.7.2
├── grunt-contrib-concat@0.4.0
├── grunt-contrib-copy@0.5.0
├── grunt-contrib-cssmin@0.9.0
├── grunt-contrib-jshint@0.10.0
├── grunt-contrib-uglify@0.5.0
├── grunt-contrib-watch@0.6.1
├── grunt-notify@0.3.0
├── grunt-npm-install@0.1.0 extraneous
├── node-sass@0.9.3
├── npm@2.0.0-beta.0 extraneous
├── npm-install@0.0.1 extraneous
└── npm-install-retry@0.0.6 extraneous

npm ERR! peer invalid: grunt@0.4.5 /Users/user/www/my_project/node_modules/grunt
npm ERR! extraneous: grunt-npm-install@0.1.0 /Users/user/www/my_project/node_modules/grunt-npm-install
npm ERR! extraneous: npm-install@0.0.1 /Users/user/www/my_project/node_modules/npm-install
npm ERR! extraneous: npm-install-retry@0.0.6 /Users/user/www/my_project/node_modules/npm-install-retry
npm ERR! extraneous: npm@2.0.0-beta.0 /Users/user/www/my_project/node_modules/npm
npm ERR! not ok code 0
我运行npm cache clean,花了几个小时尝试了许多我发现的选项,但到目前为止没有任何帮助。我想知道这是否是npm版本的问题:我有2.0.0-beta.0版本,项目需要1.3.x版本。错误提示发出咕噜声的错误。 其他安装版本如下: 节点v0.10.31

npm 2.0.0-beta.0

鲍尔-v1.3.9

grunt cli v0.1.13


grunt v0.4.0

此版本也有错误。参考:github.com/npm/npm/issues/6033 TLDR降级npm版本或关注grunt-*相关软件包的更新,以使用不同的方式表达其依赖性。另请参见这个粗俗丑陋的问题:
{
  "name": "my_project",
  "version": "1.0.0",
  "engine": {
    "node": "0.10.x",
    "npm": "1.3.x"
  },
  "devDependencies": {
    "bower": "~1.3.7",
    "grunt": "^0.4.5",
    "grunt-autoprefixer": "^0.8.1",
    "grunt-cache-bust": "^0.3.9",
    "grunt-contrib-clean": "^0.5.0",
    "grunt-contrib-compass": "^0.7.2",
    "grunt-contrib-concat": "^0.4.0",
    "grunt-contrib-copy": "^0.5.0",
    "grunt-contrib-cssmin": "^0.9.0",
    "grunt-contrib-jshint": "^0.10.0",
    "grunt-contrib-uglify": "^0.5.0",
    "grunt-contrib-watch": "^0.6.1",
    "grunt-notify": "^0.3.0",
    "node-sass": "^0.9.3"
  },
  "repository": {
    "type": "git",
    "url": My_project_www
  }
}

$ npm install
npm WARN package.json npm-install@0.0.1 No repository field.
npm WARN prefer global npm@2.0.0-beta.0 should be installed with -g
npm ERR! peerinvalid The package grunt does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer grunt-autoprefixer@0.8.1 wants grunt@~0.4.2
npm ERR! peerinvalid Peer grunt-cache-bust@0.3.9 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-clean@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-compass@0.7.2 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-concat@0.4.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-copy@0.5.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-cssmin@0.9.0 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-contrib-jshint@0.10.0 wants grunt@~0.4.0
npm ERR! peerinvalid Peer grunt-contrib-uglify@0.5.0 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-notify@0.3.0 wants grunt@~0.4.1
npm ERR! peerinvalid Peer grunt-npm-install@0.1.0 wants grunt@~0.4.1

npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/user/www/my_project
npm ERR! node -v v0.10.31
npm ERR! npm -v 2.0.0-beta.0
npm ERR! code EPEERINVALID
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/user/www/my_project/npm-debug.log
npm ERR! not ok code 0