오류: window powershell을 사용하여 새 각도 프로젝트를 만들 때 "운영 체제에서 작업이 거부되었습니다."
새로운 각도 프로젝트를 만들 때 계속 같은 오류 메시지가 나타납니다.다음 명령을 사용하여 Windows Powershell을 사용하여 새로운 각도 프로젝트를 만들려고 했습니다.
ng new hell-world
-> 각도 라우팅을 추가하시겠습니까? - 예
-> 스타일시트 형식? - CSS
아래 오류 메시지를 받았습니다.이미 angular cli를 다시 설치하려고 했고 Administrator를 사용하여 Powershell을 실행하고 있습니다.
설치된 버전:
각도 CLI: 8.0.6
노드: 10.16.0
OS: win32 x64
오류 메시지:
npm WARN tarball data for tslint@~5.15.0 (sha512-6bIEujKR21/3nyeoX2uBnE8s+tMXCQXhqMmaIPJpHmXJoBJPTLcI7/VHRtUwMhnLVdwLqqY3zmd8Dxqa5CVdJA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for jasmine-spec-reporter@~4.2.1 (sha512-FZBoZu7VE5nR7Nilzy+Np8KuVIOxF4oXDPDknehCYBDE080EnlPu0afdZNmpGDBRCUBv3mj5qgqCRmk6W/K8vg==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for acorn@^6.0.5 (sha512-jPTiwtOxaHNaAPg/dmrJ/beuzLRnXtB0kQPQ8JpotKJgTB6rX6c8mlf315941pyjBSaPg8NHXS9fhP4u17DpGA==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for @angular/language-service@~8.0.3 (sha512-04XojOo9FJgEQE/rZafnaJQxPEU+//TSzTgpGoIVzCSMx+joCY/ZSSwJZPWxiHlOE57W/zX02ZY+TwcM81oTdw==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\@angular\platform-browser-447d0944\esm2015\animations\src\animation_builder.js'
npm ERR! path C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall unlink
npm ERR! Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! { [Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif']
npm ERR! cause:
npm ERR! { Error: EPERM: operation not permitted, unlink 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\jasmine-spec-reporter-cbb15ffc\screenshot.gif'
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif' },
npm ERR! stack:
npm ERR! 'Error: EPERM: operation not permitted, unlink \'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif\'',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'unlink',
npm ERR! path:
npm ERR! 'C:\\Users\\konta\\Desktop\\Programming_files\\Angular\\hello-world\\node_modules\\.staging\\jasmine-spec-reporter-cbb15ffc\\screenshot.gif',
npm ERR! parent: 'hello-world' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm WARN tar EPERM: operation not permitted, lstat 'C:\Users\konta\Desktop\Programming_files\Angular\hello-world\node_modules\.staging\@angular\router-8388bfd5\esm2015\src\directives'
npm WARN tarball tarball data for typescript@3.4.4 (sha512-xt5RsIRCEaf6+j9AyOBgvVuAec0i92rgCaS3S+UVf5Z/vF2Hvtsw08wtUTJqp4djwznoAgjSxeCcU4r+CcDBJA==) seems to be corrupted. Trying one more time.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\konta\AppData\Roaming\npm-cache\_logs\2019-07-01T01_21_13_653Z-debug.log
Package install failed, see above.
window10에서 window defender / window security ==> realtime protection을 비활성화하고 npm install 명령을 다시 시도해보니 작동했습니다.
참고 : 설치가 완료된 후 실시간 보호 기능을 다시 켭니다.
문제를 발견했습니다.내 바이러스 백신이 어떻게든 나도 모르게 파일을 차단하고 있었습니다.설치하는 동안 바이러스 백신을 일시 중지하면 작동했습니다.
저는 기계를 다시 시작하는 것이 효과가 있었습니다.
제가 맥에서 이런 문제가 있었습니다.명령어 앞에 'sudo'를 붙였는데 효과가 있었습니다.
sudo npm install -g parcel-bundler
관리자로 실행으로 CMD를 열어본 다음 npmi를 실행해보니 효과가 있었습니다.
카디르 후세인의 대답을 토대로 작은 대답을 덧붙이고 싶습니다.
Windows Security(윈도우 시큐리티)에서 "Realtime Protection(실시간 보호)"을 비활성화하면 "Realtime Protection(실시간 보호)"이 해제되어 있을 때 노트북이나 PC가 감염될 수 있는 바이러스에 취약하게 됩니다.NPM 패키지만 설치하는 경우에는 이것이 약간 불가능해 보일 수 있지만, 일부 앱에는 숨겨진 백그라운드 프로세스가 "실시간 보호"가 비활성화되기를 기다리고 있을 수 있으며, 비활성화된 경우 바이러스를 주입할 수 있습니다.
그럼에도 불구하고 선택의 여지는 남아있습니다.
- 먼저 시작 메뉴에서 "Windows Security(윈도우 보안)"를 입력하여 Windows Security(윈도우 보안)를 열고 "Open(열기)"을 누릅니다.
- 그런 다음 "바이러스 및 위협 보호"로 이동합니다.
- 그런 다음 "바이러스 및 위협 보호 설정"에서 "설정 관리"를 찾을 때까지 아래로 스크롤합니다.
- 그런 다음 "제외사항"이 표시될 때까지 아래로 스크롤합니다."제외사항" 아래에 "제외사항 추가 또는 제거"라는 링크가 있습니다.
- 이 작업이 완료되면 "제외 추가" 버튼을 누릅니다.그런 다음 드롭다운 메뉴에서 "폴더"를 누릅니다.
합니다를 합니다.
node_modules
문제를 주고 있는 디렉토리입니다.마지막으로 관리 권한 허용입니다.
마지막으로 Windows Security(윈도우 시큐리티)를 종료합니다.
전체 프로젝트 폴더를 제외하는 것은 권장하지 않습니다. 그러면 디렉토리에 대한 모든 검색이 비활성화되기 때문입니다.
여기에 작은 면책 사항이 있습니다. 저는 "실시간 보호"를 비활성화하지 않고 다른 사람을 돕기 위한 수단으로만 이 답변을 하고 있습니다.이것을 권장하지는 않지만, 이것이 일반적인 문제를 해결하는 데 도움이 될 수도 있습니다.
좋은 하루 되세요.:)
저에게는 다음과 같은 여러 가지 가능성이 있습니다.
안티바이러스 소프트웨어에 의해 감청되어 작동 불능 상태에 빠졌습니다.
IDE에 의해 잠기므로 작동이 불가능합니다.
npm 실행으로 작업이 잠기므로 작동이 불가능합니다.
저는 사용하고 있던 npm 버전이 문제였습니다.아래 명령어를 사용하여 버그가 없는 npm 버전으로 변경하였습니다.
npm install --global npm@8.3.1
github 문제에서 이 솔루션을 찾았습니다.
나처럼 도움이 되었으면 좋겠군요!
npm start
처리 및 터미널 창 닫기(Hyper Terminal 사용)가 잘 되었습니다(Win 10 사용).
그 후 npm 패키지를 제거하고 다른 패키지를 설치할 수 있었습니다.
저는 비주얼 스튜디오 코드를 실행했습니다.나는 그것을 끄고 펑! 나를 위해 일했습니다!
저에게 윈도우 10을 사용하면 이 문제를 해결할 수 있는 유일한 방법은 node_modules 폴더를 제외하고 프로젝트 폴더에서 관리 모드로 Visual Studio Code를 열고 다음 명령을 실행하는 것입니다.
npm install -g --unsafe-perm
이 문제에 직면해 있었고 이렇게 해결되었습니다. -전면 및 백엔드 모두에 대한 개발 서버 실행 중지:
두가지:
- 관리자를 시험해 봅니다.
- 다른 프로세스가 폴더/파일을 점유하지 않는지 확인합니다.
저는 바이러스 백신과 관련이 없었습니다.프로세스가 이 폴더를 점유한 것으로 보입니다.내 경우 노드 프로세스가 내 node_ modules 폴더를 차지했습니다.프로세스 탐색기를 사용하여 확인했습니다. 경로 끝을 검색한 결과 이 폴더를 사용하는 노드 프로세스가 발견되었습니다(닫았음에도 불구하고! 윈도우에서는 매우 일반적입니다). 그래서 이 프로세스를 종료하고 더 이상 이 오류가 발생하지 않았습니다.
저도 같은 문제가 있었습니다. 제가 잘못한 것은 제가 그 문제를 설정했다는 것입니다.npm registry
에 이르기까지local registry
, 글로벌 사용으로 재설정하면 이 문제가 발생한다는 사실을 모른 채npm config set registry https://registry.npmjs.org/
오류가 사라졌습니다.
위의 모든 것을 시도했습니다.
삭제중node_modules
다시 설치하는 게 내게 도움이 됐어요.
새 npm 종속성인 jest를 설치하려고 할 때 다음과 같이 발생했습니다.
npm i --save-dev jest
명령어를 다시 실행하는 것만으로 작동했습니다.
언급URL : https://stackoverflow.com/questions/56829352/error-the-operation-was-rejected-by-your-operating-system-when-trying-to-crea
'itsource' 카테고리의 다른 글
명령 줄에 있는 비주얼 스튜디오로 x64 코드를 컴파일하는 방법은? (0) | 2023.09.24 |
---|---|
Oracle, PDO_OCI 대 OCI8 (0) | 2023.09.19 |
숫자 배열이 '\0' 또는 null 문자로 끝나지 않는 이유는 무엇입니까? (0) | 2023.09.19 |
예기치 않은 롤백예외:트랜잭션이 롤백 전용으로 표시되어 롤백되었습니다. (0) | 2023.09.19 |
MySQL에서 병합 문을 사용할 수 있는지 여부 (0) | 2023.09.19 |