ubuntu npm install不安装依赖项或dev依赖项

时间:2015-09-16 23:47:09

标签: node.js ubuntu npm ubuntu-14.04

我已将一个项目的回购(在mac上制作)克隆到我的ubuntu机器上,并且我遇到了很多让节点工作的问题。我觉得我在最后的障碍。

根据package.json文件,我无法npm install安装依赖项。

请注意,在适当的情况下,我已使用<repo description><repo name><app name>来保护隐私。

package.json(为了隐私而删除了git repo名称):

{
  "name": "<repo name>",
  "version": "1.0.0",
  "engines": {
    "npm": "2.1.x"
  },
  "description": "<repo description>",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "postinstall": "bower install",
    "start": "node server.js"
  },
  "repository": {
    "type": "git",
    "url": "git+https://github.com/<repo name>"
  },
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/<repo name>/issues"
  },
  "homepage": "https://github.com/<repo name>#readme",
  "devDependencies": {
    "grunt": "^0.4.5",
    "grunt-contrib-sass": "^0.9.2",
    "grunt-contrib-watch": "^0.6.1",
    "jasmine-core": "^2.3.4",
    "karma": "^0.13.9",
    "karma-chrome-launcher": "^0.2.0",
    "karma-jasmine": "^0.3.6",
    "karma-phantomjs-launcher": "^0.2.1",
    "phantomjs": "^1.9.18",
    "protractor": "^2.2.0"
  },
  "dependencies": {
    "bower": "^1.5.2",
    "ejs": "^2.3.4",
    "express": "^4.13.3",
    "http-server": "^0.8.0"
  },
  "directories": {
    "test": "test"
  }
}

运行npm install时,我得到:

npm WARN package.json <app name>@1.0.0 No README data

> <app name>@1.0.0 postinstall /home/andrew/projects/<app name>
> bower install

andrew:<app name>$ 

运行sudo npm install时,我得到:

npm WARN package.json <app name>@1.0.0 No README data
npm WARN cannot run in wd <app name>@1.0.0 bower install (wd=/home/andrew/projects/<app name>)

node -v返回v0.12.7nodejs -v返回v0.10.25npm -v返回2.12.1bower -v返回1.5.2 ,但grunt -v返回:

No command 'grunt' found, did you mean:
 Command 'grun' from package 'grun' (universe)
grunt: command not found

(只是证明grunt尚未安装)。

0 个答案:

没有答案
相关问题