npm安装命令什么都不做 [英] npm install command doing nothing

查看:213
本文介绍了npm安装命令什么都不做的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含以下内容的package.json:

I have a package.json with the following contents:

{
  "name": "useless-app",
  "version": "1.0.0",
  "dependencies": {},
  "devDependencies": {
    "grunt": "~0.4.1",
    "grunt-contrib-copy": "~0.4.0",
    "grunt-contrib-concat": "~0.2.0",
    "grunt-contrib-coffee": "~0.6.6",
    "grunt-contrib-jst": "~0.5.0",
    "grunt-contrib-uglify": "~0.2.0",
    "grunt-contrib-compass": "~0.2.0",
    "grunt-contrib-jshint": "~0.4.3",
    "grunt-contrib-cssmin": "~0.6.0",
    "grunt-contrib-connect": "0.3.0",
    "grunt-contrib-clean": "0.4.0",
    "grunt-contrib-htmlmin": "0.1.3",
    "grunt-contrib-imagemin": "0.1.4",
    "grunt-contrib-livereload": "0.1.2",
    "grunt-mocha": "~0.3.1",
    "grunt-bower-requirejs": "~0.4.1",
    "grunt-usemin": "~0.1.10",
    "grunt-requirejs": "~0.3.5",
    "grunt-regarde": "~0.1.1",
    "grunt-open": "~0.2.0",
    "matchdep": "~0.1.2"
  },
  "engines": {
    "node": ">=0.8.0"
  }
}

这是Yeoman为我制定的标准。当我打电话给 npm install npm install -g 时,我没有任何操作,只是这样:

Which is what Yeoman built for me as standard. When I call npm install or npm install -g I get no action, just this:

Alex@iMac-2 ~/Sites/Backbone/Yeoman$ sudo npm install -g
useless-app@1.0.0 /usr/local/lib/node_modules/useless-app

此时我有些期待应用程序列表下载并安装。无论哪种方式,通过运行grunt(列表中的一项)来测试,结果如下:

At this point I was somewhat expecting a list of applications being downloaded and installed. Either way, testing this by running grunt (one of the items from the list), results in the following:

Alex@iMac-2 ~/Sites/Backbone/Yeoman$ grunt
-bash: grunt: command not found



<

Any ideas why these things aren't installing?

我试过对这些命令使用 sudo 结果总是一样的。

I have tried using sudo for these commands and the result is always the same.

推荐答案

您是否安装了grunt-cli?请记住,在最新版本的Grunt中,为了执行 grunt 命令,您需要使用grunt-cli。

Have you installed grunt-cli? Remember that in the newest versions of Grunt you need to have grunt-cli in order to execute grunt commands.

试试 sudo npm install -g grunt-cli

祝好,
Kevin。

Best regards, Kevin.

这篇关于npm安装命令什么都不做的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆