일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- techEmpower
- caddy
- 프래그먼트
- C lanuage
- 번역
- 개발자
- android
- H2O
- server
- mariadb
- 구글
- C
- MySQL
- kakao
- Portfolio
- 안드로이드
- java
- javascript
- unity
- 자바
- 한글
- it
- 개발
- 해석
- php
- centOS7
- error
- ubuntu
- NGINX
- 컴퓨터과학총론
- Today
- Total
개발모음집
reactJS install on ubuntu16.04 본문
reactJS를 설치하려면 node.js와 npm을 설치해야한다.
nodejs를 설치하면 npm도 자동설치된다.
주의 사항 nodejs는 nvm으로 설치해야한다.
# apt-get install wget
# wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
docker 에선 안되어서 #source ~/.bashrc
# nvm install --lts
출처: postype
# apt-get install -y build-essential
# npm install -g create-react-app
# create-react-app voidreact
# cd voidreact
#npm start
출처: codeburst
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
예전 방법
(nodejs는 nvm으로 설치해야한다는 글을 보고 nodejs설치방법 바꿈)
62 apt-get install wget
63 wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
65 apt-get update
66 apt-get install nodejs
67 apt-get install npm
68 nodejs -v
70 apt-get install -y build-essential
71 npm install -g create-react-app
72 create-react-app voidReact
85 ln -s /usr/bin/nodejs /usr/local/bin/node
86 create-react-app voidReact
88 npm cache clean -f
89 npm install -g n
90 n stable
91 n latest
92 nodejs -v
94 create-react-app voidreact
95 ls
96 cd /voidreact
97 cd voidreact
98 npm start
# create-react-app voidreact
// = > 에러발생
// "/usr/bin/env: node: No such file or directory"
// => 해결방법 => 심볼릭 링크 추가
# ln -s /usr/bin/nodejs /usr/local/bin/node
//출처 : blog
= > 에러발생
// You are running Node 4.2.6.
// Create React App requires Node 8 or higher.
// Please update your version of Node.
=> 해결방법 => 업그레이드
# npm cache clean -f
# npm install -g n
# n stable
# n latest
'client > React' 카테고리의 다른 글
React 문법 (0) | 2019.12.10 |
---|---|
React input 태그 onchange될 때마다 log로 출력하기 (0) | 2019.04.15 |
React Redux simple example (0) | 2019.01.23 |