Web Programming
NPX 설치 오류 - 설치가 오류 코드 1로 실패했습니다
맑은안개
2021. 7. 18. 00:38
NPX, 설치가 오류 코드 1로 실패했습니다 해결방법
설치가 오류 코드 1로 실패했습니다와 같은 설치 오류 시 NPM이 설치 되는 경로에 띄어쓰기가 있는지 확인한다.
D:\docker-react-app>npx create-react-app ./
npm ERR! code ENOLOCAL
npm ERR! Could not install from "HOON\AppData\Roaming\npm-cache\_npx\60212" as it does not contain a package.json file.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\TEST USER HOON\AppData\Roaming\npm-cache\_logs\2021-07-17T15_25_55_433Z-debug.log
create-react-app@latest 설치가 오류 코드 1로 실패했습니다
위에서 보이는것 처럼, 띄어쓰기로 인해 디렉토리를 TEST USER HOON이 아닌 HOON 부터 읽었다.
해결방법은 npm의 전역 설치 경로를 띄어쓰기가 없는 경로로 변경하면 된다.
D:\docker-react-app>npm config set prefix c:\npm
D:\docker-react-app>npm config set cache c:\npm-cache
설정 후 npx 정상 동작 확인.
반응형