!주의
•
React 프로젝트 생성시 sudo를 꼭 붙여준다
sudo npx create-react-app [프로젝트명]
JavaScript
복사
•
axios 추가 - package.json
dependencies": {
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.1.3",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
Plain Text
복사
•
styled-component setting - package.json
"react-dom": "^18.3.1",
"react-scripts": "5.0.1",
"styled-components": "^5.3.11",
Plain Text
복사
•
// 해당 명령어 실행하기
sudo chown -R $(whoami) ~/.npm
sudo chown -R $(whoami) /usr/local/lib/node_modules
Plain Text
복사