본문 바로가기

create-react-app3

cannot find module react-script.js create-react-app을 통해 프로젝트를 시작할 때, 이러한 에러가 발생했다. npm install도 다시해보고 package.json을 확인해보았을 때도, 이유를 찾을 수 없었다. 그래서 검색을 해보니 다음과 같은 글이 있었다. https://stackoverflow.com/questions/60912342/error-cannot-find-module-react-scripts-bin-react-scripts-js Error: Cannot find module '\react-scripts\bin\react-scripts.js' I have just started learning React and created a first app by using below commands npm install -.. 2021. 5. 16.
npm, yarn start attempting to bind x86_64-apple-darwin npm create-react-app npm start 윈도우에서 작업한 react app을 mac에서 불러온 뒤 npm start를 해보면 다음과 같이 실행이 된다. Attempting to bind to HOST environment variable: x86_64-apple-darwin13.4.0 이렇게 나오게 된다. 그리고 내가 원했던 localhost:3000이 아니라 http://x86_64-apple-darwin13.4.0.:3000에서 실행이 되어버린다. 당연히 접속은 되지 않은다 이러한 상황은 .bashrc 또는 .bash_profile에 host가 환경변수로 저장되어 있어서 그런 것 같다. 그래서 package.json에 "open": "start http://localhost:3000".. 2020. 9. 17.
Powershell unauthorizedAccess 해결하기 windows에서 react를 사용하기 위해 yarn을 설치하는 중.... powershell에서 npm install --global yarn 을 실행 설치가 완료된 후 yarn -version 을 실행했는데 다음과 같은 오류가 발생했다. CategoryInfo : 보안오류 FullQualifiedErrorId : UnauthorizedAccess 처음엔 권한 문제라길래 관리자 권한으로 실행해보았지만, 소용이 없었다. 그래서 찾아봤더니 powershell에서는 보안 문제로 스크립트 실행을 막아놨다고 한다. 그래서 정책을 변경해야 한다 파워쉘을 관리자권한으로 실행시킨 뒤, set-executionpolicy unrestricted 이렇게하면 모든 스크립트를 허용하는 상태로 변경된다. 이렇게 한 뒤, 원래.. 2020. 9. 17.