2016-06-09 7 views
1

이 문Windows 머신에서 다중 패키지 npm 설치를위한 올바른 구문은 무엇입니까?

( here에서 촬영)

npm install --save @angular2-material/{core,button,card}

윈도우 PowerShell을

At line:1 char:44 
+ npm install --save @angular2-material/{core,button,card} 
+           ~ 
Missing argument in parameter list. 
    + CategoryInfo   : ParserError: (:) [], ParentContainsErrorRecordException 
    + FullyQualifiedErrorId : MissingArgument 

산출과 윈도우 콘솔

npm ERR! addLocal Could not install D:\VST\ngMaterial1\@angular2-material\{core,button,card} 
npm ERR! Windows_NT 6.1.7601 
npm ERR! argv "D:\\nodejs\\node.exe" "D:\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "@angular2-material/{core,button,card}" 
npm ERR! node v5.10.1 
npm ERR! npm v3.8.3 
npm ERR! path D:\VST\ngMaterial1\@angular2-material\{core,button,card} 
npm ERR! code ENOENT 
npm ERR! errno -4058 
npm ERR! syscall open 

npm ERR! enoent ENOENT: no such file or directory, open 'D:\VST\ngMaterial1\@angular2-material\{core,button,card}' 
npm ERR! enoent ENOENT: no such file or directory, open 'D:\VST\ngMaterial1\@angular2-material\{core,button,card}' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR!  D:\VST\ngMaterial1\npm-debug.log 

를 산출 (--save 인수가 따옴표로 묶여있을 때 PowerShell에도 있음).

Windows 머신에서 다중 패키지 npm 설치의 올바른 구문은 무엇입니까?

답변

1

올바른 명령은 npm i lodash hapi thinky when입니다.

npm install --save @angular2-material/core @angular2-material/button @angular2-material/card 

Windows에서, 당신은 동일한 기능을 수행하거나 확장 MingW Bash를 사용할 수 있습니다

npm install --save @angular2-material/{core,button,card} 

가에 bash에 의해인가 : 당신은 더 NPM 팁 here

+1

그런 설치 지침은 단순히 그대로 적용되는 것이 아니라 해석 (확장) 된 것으로 보입니다. – CalvinDale

1

다음 명령을 읽을 수 있습니다 명령을 수동으로.

-1

{package1, package2...} 트릭은 bash에만 해당됩니다. 이것은 powershell이나 cmd에서는 작동하지 않습니다. Windows에서이 작업을하려면 새로운 bash (또는 동등한) 터미널을 열고 명령을 실행하면 제대로 작동합니다.