2017-12-12 10 views
1

시도한 실행 npm 설치 -g @ angular/cliWindows cmd를 실행할 때 npm 설치가 실패하지만 git bash 또는 터미널에서 실행할 때 제대로 작동합니까?

그리고 일관되게 아래 오류가 발생했습니다. 관리자로도 실행하려고 시도했지만 결과는 없습니다.

23286 error path C:\Users\XX\AppData\Roaming\npm\ng 
23287 error code EPERM 
23288 error errno -4048 
23289 error syscall open 
23290 error Error: EPERM: operation not permitted, open 'C:\Users\XX\AppData\Roaming\npm\ng' 
23290 error { Error: EPERM: operation not permitted, open 'C:\Users\XX\AppData\Roaming\npm\ng' 
23290 error cause: 
23290 error { Error: EPERM: operation not permitted, open 'C:\Users\XX\AppData\Roaming\npm\ng' 
23290 error  errno: -4048, 
23290 error  code: 'EPERM', 
23290 error  syscall: 'open', 
23290 error  path: 'C:\\Users\\XX\\AppData\\Roaming\\npm\\ng' }, 
23290 error stack: 'Error: EPERM: operation not permitted, open \'C:\\Users\\XX\\AppData\\Roaming\\npm\\ng\'', 
23290 error errno: -4048, 
23290 error code: 'EPERM', 
23290 error syscall: 'open', 
23290 error path: 'C:\\Users\\XX\\AppData\\Roaming\\npm\\ng' } 
23291 error Please try running this command again as root/Administrator. 
23292 verbose exit [ -4048, true ] 
+0

관리자도 시도 할 때 동일한 오류가 표시됩니까? –

+0

Hi Jiithin, 예, 관리자 권한으로 실행, 아직 같은 문제로 명령 프롬프트를 열어 보았습니다. –

+0

동일한 오류가 여러 사용자가 여러 가지 방법으로 해결되면 "https://github.com/angular/angular-cli/issues/1349"한 번이 링크를 참조하십시오. 여러 가지 옵션이 있습니다. 어느 옵션이든 해결할 수 있습니다. 작동, 설치 디렉토리를 변경해보십시오. –

답변

0

나는 윈도우 약 100 % 확실하지 않다,하지만 당신은 다른 곳에서 프로젝트 폴더를 사용하거나 다른 도구에서, 또는 안티 바이러스가 설치를 고정하는 경우이 발생할 수 있습니다.

npm cache clean를 실행 해 다음 npm install

+0

theberbie 감사합니다. npm 캐시를 깨끗하게하기 위해 -f를 추가해야했습니다. 그러나 그 후에도 오류가 계속됩니다. 그리고 나는 동일한 오류를 git bash 터미널에서도 얻었지만, 설치하는 동안 같은 시점이 아니라 다른 모듈에 이번에는 npm ERR! 오류 : EPERM : 작업이 허용되지 않습니다. 'C : \ XX \ node_modules \ fsevents \ node_modules \ d ashdash \ node_modules' 설치가 잠길 수 있습니다. 그러나 이것은 항상 시행 착오와 함께 할 것입니다. 어떤 프로세스가 프로세스를 차단하고 있는지 확인할 수 있습니다. 어떤 아이디어? –

+0

프로젝트 폴더 (Sublime, Atom 등)가있는 텍스트 편집기를 사용하는 경우 닫고 npm cache clean을 실행하십시오. 내 이해는 여전히 오류가 발생하지만 이제는 node_modules로 이동했습니다. 맞습니까? 안티 바이러스를 사용하는 경우'npm cache clean'을 실행하고'npm install '을 실행하기 전에 비활성화하십시오. – theberbie

0

there may be some process locking the installation.
But is this always going to be with trial and error. How can i identify which process is blocking it and see if i can do something about

사용 Process Explorer (단순 EXE, 필요없이 설치)를 실행 : 예를 들면 그것으로, 당신은 + FCtrl 키를 입력 할 수 있습니다와 "Roaming\npm"를 검색 .
해당 폴더에서 핸들이 열려있는 프로세스가 표시됩니다.

+0

VonC! 내가 한 번해볼 게. –