简体   繁体   English

凉亭命令没有返回任何东西

[英]bower command not returning anything

I've been trying to install bower, but I must be missing something cause the command bower is not returning anything at all! 我一直在尝试安装凉亭,但我必须遗漏一些因为命令凉亭根本没有返回任何东西!

I installed bower like this: 我安装了这样的凉亭:

sudo npm install bower -g

this is the output: 这是输出:

npm http GET https://registry.npmjs.org/bower
npm http 304 https://registry.npmjs.org/bower
npm http GET https://registry.npmjs.org/tmp
...
...  # Many requests here n_n
npm http GET https://registry.npmjs.org/traverse
npm http 304 https://registry.npmjs.org/traverse
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
bower@0.8.5 /usr/lib/node_modules/bower
├── stable@0.1.3
├── archy@0.0.2
├── colors@0.6.0-1
├── tmp@0.0.16
├── async@0.2.6
├── mkdirp@0.3.5
├── semver@1.1.4
├── request@2.11.4
├── hogan.js@2.0.0
├── lodash@1.0.1
├── rimraf@2.0.3 (graceful-fs@1.1.14)
├── nopt@2.0.0 (abbrev@1.0.4)
├── fstream@0.1.22 (inherits@1.0.0, graceful-fs@1.2.0)
├── promptly@0.1.0 (read@1.0.4)
├── tar@0.1.16 (inherits@1.0.0, block-stream@0.0.6)
├── read-package-json@0.1.13 (graceful-fs@1.2.0, lru-cache@2.0.4, slide@1.1.3, npmlog@0.0.2)
├── rc@0.0.8 (config-chain@0.3.3, optimist@0.3.5)
├── glob@3.1.21 (inherits@1.0.0, graceful-fs@1.2.0, minimatch@0.2.11)
└── unzip@0.1.4 (buffers@0.1.1, over@0.0.5, pullstream@0.1.0, setimmediate@1.0.1, readable-stream@0.2.0, binary@0.3.0)

seems ok.. 好像..

but then I do bower --help and nothing happens, it doesn't show anything.. I've even tried a sudo bower --help 但后来我做bower --help没有任何反应,它没有显示任何东西..我甚至尝试了一个sudo bower --help

My nodejs version is v0.8.22 , npm version 1.2.14 on Ubuntu 12.10 我的nodejs版本是Ubuntu 12.10上的v0.8.22,npm版本1.2.14

Any ideas?? 有任何想法吗?? thanks in advance 提前致谢

Ok!!! 好!!!

I found the problem... this is so stupid it made me laugh (even if i lost my night on this) 我发现了问题......这太愚蠢了让我发笑(即使我在这上面失去了我的夜晚)

It seems that there's another software called " node " (Amateur Packet Radio Node program). 似乎还有另一个名为“ 节点 ”的软件(业余分组无线电节点程序)。 I removed that software with sudo apt-get remove node , reinstalled nodeJS, then sudo npm install bower -g et voila!!! 我用sudo apt-get remove node删除了该软件,重新安装了nodeJS,然后sudo npm install bower -g et voila !!!

so it seems that amateur packet radio people dont get along with web developpers... too bad 所以业余分组无线电人员似乎与网络开发人员不相处......太糟糕了

Hope this helps someone else 希望这有助于其他人

Are you working behind a proxy? 你在代理背后工作吗? It seems bower doesn't automatically pick up proxy settings like npm does. 看来bower不会像npm那样自动获取代理设置。

If you set the HTTP_PROXY and HTTPS_PROXY environment variables, then bower should work. 如果设置HTTP_PROXY和HTTPS_PROXY环境变量,那么bower应该可以工作。

https://github.com/twitter/bower/issues/208 https://github.com/twitter/bower/issues/208

Note, they have to be upper case. 注意,它们必须是大写的。

Derm 真皮

Having the same issues. 有同样的问题。

All I did was edit the bower source code and alter the first line. 我所做的只是编辑凉亭源代码并改变第一行。

Fire up your terminal and jank this: 启动你的终端并猛击这个:

sudo nano `which bower`

Edit the first line that says: 编辑第一行说:

#!/usr/bin/env node

And change it to: 并将其更改为:

#!/usr/bin/env nodejs

Make sure node (Amateur Packet Radio Node program) is not installed. 确保未安装节点(业余数据包无线电节点程序)。

Viola that's it. 中提琴就是这样。 Works for mint and ubuntu 适用于薄荷ubuntu

Also make sure you're using a ' stable ' version of nodejs; 还要确保你使用的是' stable '版本的nodejs; I also had this problem, turns out was caused by installing/using latest unstable build. 我也有这个问题,结果是由安装/使用最新的不稳定版本引起的。 Don't know whether it was a node issue, or an npm one (appears npm updates are packaged along w/ node). 不知道它是节点问题还是npm问题(出现npm更新是沿着w / node打包的)。

(quick aside, use 'n' - https://github.com/visionmedia/n - to manage your node version...much less of a PITA ;)) (快一点,使用'n' - https://github.com/visionmedia/n - 来管理您的节点版本......更不用说PITA;))

我在mac上有类似的问题,最后更新我的npm路径似乎工作:

export PATH=$PATH:/usr/local/share/npm/bin

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM