2014-12-16 2 views
0

win8.1에서 cmder를 사용하고 있습니다. npm을 사용하여 node.js를 설치했습니다. 나는 cmder에서 NPM에 대한 별명을 작성하고 내가 그것을 확인 있는지 확인하려고 할 때, 나는 내가 얻을 모든사용 명령 입력 후 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 

[email protected] C:\Program Files\nodejs\node_modules\npm 
문제가 될 수있다

누군가가 나를 도울 수 있습니까? 내가 찾은 모든 잘못된 명령이 삽입 될 때이가 표시 될 것입니다,하지만 난이 유효하다고 생각

당신은이 별명 시도해야
+0

별칭을 어떻게 추가 했습니까? 왜 처음부터 필요합니까? 정상적인 명령 프롬프트에서'npm --version'이 작동합니까? – mscdex

+0

@mscdex'별칭 npm = "C : \ Program ~ 2 \ nodejs \ npm.cmd"'왜 필요합니까? 왜냐하면 npm --version 복귀 전에 인식하지 못했기 때문입니다. –

+0

여기 해결책은 무엇입니까? 나는 똑같은 문제가 있습니다. 그러나 아래의 solutiion을 이해하지 못합니다. –

답변

1

:

alias npm=C:\Progra~2\nodejs\npm.cmd $* 당신이있는 경우를 "프로그램 파일 (86)"또는 alias npm=C:\Progra~1\nodejs\npm.cmd $* 당신이 경우 "프로그램 파일"만 있으면됩니다.

+0

예,이게 작동합니다 :) 감사합니다. 별칭 npm = "C : \ Program ~ 2 \ nodejs \ npm.cmd"와'alias npm = C : \ Progra의 차이점은 무엇입니까? ~ 2 \ nodejs \ npm.cmd $ *' –