我在win8.1中使用cmder。我已经使用 npm 安装了 node.js。我已经在 cmder 中为 npm 创建了别名,当我尝试检查它是否正常时,我使用 npm --version
我得到的是
npm config help
Usage: npm <command>
where <command> is one of:
add-user, adduser, apihelp, author, bin, bugs, c, cache,
completion, config, ddp, dedupe, deprecate, docs, edit,
explore, faq, find, find-dupes, get, help, help-search,
home, i, info, init, install, isntall, issues, la, link,
list, ll, ln, login, ls, outdated, owner, pack, prefix,
prune, publish, r, rb, rebuild, remove, repo, restart, rm,
root, run-script, s, se, search, set, show, shrinkwrap,
star, stars, start, stop, submodule, tag, test, tst, un,
uninstall, unlink, unpublish, unstar, up, update, v,
version, view, whoami
npm <cmd> -h quick help on <cmd>
npm -l display full usage info
npm faq commonly asked questions
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\svrcek\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm@1.4.3 C:\Program Files\nodejs\node_modules\npm
有人可以帮助我哪里可能有问题吗?我发现这是在插入无效命令时显示的,但我认为它是有效的
最佳答案
您应该尝试这个别名:
alias npm=C:\Progra~2\nodejs\npm.cmd $*
如果您有“Program Files (x86)”或
alias npm=C:\Progra~1\nodejs\npm.cmd $*
如果你只有“Program Files”。
关于node.js - 输入任何命令后使用 npm 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27506721/