首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NPM install -g在钛安装后无法正常工作

NPM install -g在钛安装后无法正常工作
EN

Stack Overflow用户
提问于 2013-11-20 14:31:41
回答 1查看 992关注 0票数 7

我已经在我的mac上安装了Titanium,现在,当我尝试全局安装任何npm包时,都会失败。

我安装后的输出是

代码语言:javascript
复制
npm http 304 https://registry.npmjs.org/loggly
npm http GET https://registry.npmjs.org/underscore
npm http GET https://registry.npmjs.org/timespan
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/underscore
npm http 304 https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/timespan
/Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/bin/grunt-init -> /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init/bin/grunt-init
grunt-init@0.2.1 /Applications/Titanium Studio/TitaniumStudio.app/Contents/MacOS/Password:/usr/local/share/npm/lib/node_modules/grunt-init
├── semver@1.0.14
├── colors@0.6.2
├── hooker@0.2.3
├── grunt@0.4.1 (which@1.0.5, dateformat@1.0.2-1.2.3, eventemitter2@0.4.13, async@0.1.22, lodash@0.9.2, coffee-script@1.3.3, underscore.string@2.2.1, findup-sync@0.1.2, iconv-lite@0.2.11, nopt@1.0.10, rimraf@2.0.3, minimatch@0.2.12, glob@3.1.21, js-yaml@2.0.5)
└── prompt@0.1.12 (async@0.1.22, pkginfo@0.3.0, winston@0.5.11)

当我随后执行grunt init时,没有返回任何内容。这似乎是钛的一部分,是干扰我的-g npm安装?

这是在我安装了Titanium之后才开始发生的。如果我在npm目录中手动安装grunt init,我可以让它正常工作,但这确实夺走了我最好的功能。

请帮帮我!

EN

回答 1

Stack Overflow用户

发布于 2013-11-21 01:48:30

尝试键入:

代码语言:javascript
复制
npm set prefix /usr/local

然后重新安装。

票数 20
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20089016

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档