在OSX上npm安装失败

时间:2014-08-31 15:40:35

标签: gruntjs npm

$ 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

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

{
  "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

我运行npm缓存清理,几个小时尝试了很多我找到的选项,但到目前为止没有任何帮助。我想知道它是否可能是npm版本的问题:我有2.0.0-beta.0,项目需要1.3.x.错误提示grunt错误。 其他已安装的版本如下: 节点v0.10.31

npm 2.0.0-beta.0

bower -v1.3.9

grunt-cli v0.1.13

grunt v0.4.0

0 个答案:

没有答案