| ์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
|---|---|---|---|---|---|---|
| 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 | 29 | 30 | 31 |
- ๊ตฌ๊ธํฐํธ
- CDN
- formtag
- bordercollapse
- captionside
- liststyletype
- inlineblock
- liststyleimage
- liststyleposition
- ํ์ ์ ๋ ํฐ
- gtammertable
- ํฐํธ์จ์ดํธ
- ์ถ์ฝ
- textshadow
- selectorslevel4
- borderspacing
- ๊ทธ๋ฃน์ ๋ ํฐ
- ์์ด๋์ ๋ ํฐ
- fontweight
- ์ฃผ์
- texttransform
- wordspacing
- textdecoration
- ๋ชจ๋์นํฐํธ
- ํด๋์ค์ ๋ ํฐ
- ํฅ์ค์ฝ๋
- ์ ๋๋ฒ์ ์ ๋ ํฐ
- ๋นํ๊ทธ
- ํผํ๊ทธ
- borderstyle
- Today
- Total
็ก์
Create React App(CRA) tool chain ๋ณธ๋ฌธ

๐ถ Create React App(CRA) ๐ถ
React ์ ํ๋ฆฌ์ผ์ด์ ์ ๋น ๋ฅด๊ฒ ์์ํ ์ ์๋๋ก ๊ฐ๋ฐ ํ๊ฒฝ์ ์๋์ผ๋ก ๊ตฌ์ฑํด์ฃผ๋ ๊ณต์ ํด์ฒด์ธ.
โผ๏ธ ํ์ ์ด์
eact ํ๋ก์ ํธ๋ฅผ ์ฒ์ ๋ง๋ค ๋๋ Babel, Webpack, ESLint ๋ฑ ๋ค์ํ ๊ฐ๋ฐ ๋๊ตฌ๋ฅผ ์ง์ ์ค์นํ๊ณ ์ค์ ํด์ผ ํ๋ค.
CRA๋ ์ด๋ฌํ ๋ณต์กํ ์ค์ ์ ๋ฏธ๋ฆฌ ์ ๊ณตํ๊ธฐ ๋๋ฌธ์, ๊ฐ๋ฐ์๋ ํ๊ฒฝ ์ค์ ๋์ React ๊ฐ๋ฐ์ ๋ฐ๋ก ์ง์คํ ์ ์๋ค.
โผ๏ธ ์ฃผ์ ํน์ง
- ๋น ๋ฅธ ํ๋ก์ ํธ ์์ฑ: ๋ช ๋ น์ด ํ๋๋ก React ๊ฐ๋ฐ ํ๊ฒฝ์ ๊ตฌ์ฑํ๋ค.
- ์ค์ ์๋ํ: Babel, Webpack, ESLint ๋ฑ์ด ๊ธฐ๋ณธ ์ค์ ๋์ด ์๋ค.
- ๊ฐ๋ฐ์ ์ง์ค: ๋ณต์กํ ํ๊ฒฝ ์ค์ ์์ด ๋ฐ๋ก ์ฝ๋ฉ ์์ ๊ฐ๋ฅํ๋ค.
โผ๏ธ ์ค์น ๋ฐฉ๋ฒ
๋ฐฉ๋ฒ 1๏ธโฃ : ํ์ฌ ๋๋ ํ ๋ฆฌ์ ์์ฑ (์ถ์ฒ)
์ด๋ฏธ ํ๋ก์ ํธ ํด๋๋ฅผ ๋ง๋ค์ด ๋์๋ค๋ฉด, ํ์ฌ ํด๋์ React ์ฑ์ ์์ฑํ๋ ๋ฐฉ๋ฒ์ด๋ค.

ํฐ๋ฏธ๋์์ ์๋ ๋ช ๋ น์ด๋ฅผ ์คํํ๋ค.
npx create-react-app .
- .(์ )์ ํ์ฌ ๋๋ ํ ๋ฆฌ๋ฅผ ์๋ฏธํ๋ค.

์ค์น๊ฐ ์๋ฃ๋๋ฉด ํ์ํ ํจํค์ง์ ์์กด์ฑ์ด ์๋์ผ๋ก ์ค์น๋๋ฉฐ, ๋ฐ๋ก ๊ฐ๋ฐ์ ์์ํ ์ ์๋ค.
๋ฐฉ๋ฒ 2๏ธโฃ : ํ๋ก์ ํธ ์์ฑ๊ณผ ๋์์ ์ค์น
ํ๋ก์ ํธ ํด๋๋ฅผ ์์ง ๋ง๋ค์ง ์์๋ค๋ฉด, ํด๋ ์์ฑ๊ณผ React ์ฑ ์์ฑ์ ํ ๋ฒ์ ์งํํ ์ ์๋ค.
ํฐ๋ฏธ๋์์ ์๋ ๋ช ๋ น์ด๋ฅผ ์คํํ๋ค.
npx create-react-app ํ๋ก์ ํธ์ด๋ฆ
- ์์: npx create-react-app my-app
๋ช ๋ น์ด๋ฅผ ์คํํ๋ฉด my-app ํด๋๊ฐ ์์ฑ๋๊ณ , ๊ทธ ์์ React ํ๋ก์ ํธ๊ฐ ์๋์ผ๋ก ๊ตฌ์ฑ๋๋ค.
๐โ POINT ๐โ
โ๏ธ ์ด๋ฏธ ํด๋๊ฐ ์๋ค๋ฉด → npx create-react-app . โ๏ธ
โ๏ธ ์ ํ๋ก์ ํธ๋ฅผ ๋ง๋ค๋ฉด์ ์์ํ๋ค๋ฉด → npx create-react-app ํ๋ก์ ํธ์ด๋ฆ โ๏ธ
โ ๏ธ Create React App(CRA) ํ๋ก์ ํธ ์์ฑ ์ ์์ฃผ ๋ฐ์ํ๋ ์ค๋ฅ โ ๏ธ
ERROR 1. npx ๋ช ๋ น์ด๋ฅผ ์ธ์ํ์ง ๋ชปํ๋ ๊ฒฝ์ฐ

โ ์ค๋ฅ ๋ฉ์์ง
PS C:\Users\CafeAlle\Downloads\react-app> npx create-react-app .
npx : 'npx' ์ฉ์ด๊ฐ cmdlet, ํจ์, ์คํฌ๋ฆฝํธ ํ์ผ ๋๋ ์คํํ ์ ์๋ ํ๋ก๊ทธ๋จ ์ด๋ฆ์ผ๋ก ์ธ์๋์ง ์์ต๋๋ค. ์ด๋ฆ์ด ์ ํํ์ง ํ์ธํ๊ณ
๊ฒฝ๋ก๊ฐ ํฌํจ๋ ๊ฒฝ์ฐ ๊ฒฝ๋ก๊ฐ ์ฌ๋ฐ๋ฅธ์ง ๊ฒ์ฆํ ๋ค์ ๋ค์ ์๋ํ์ญ์์ค.
์์น ์ค:1 ๋ฌธ์:1
+ npx create-react-app .
+ ~~~
+ CategoryInfo : ObjectNotFound: (npx:String) [ ], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
โ ์์ธ
์ฃผ๋ก VS Code์์ PowerShell์ ์ฌ์ฉํ ๋ ๋ฐ์ํ ์ ์๋ค.

โญ ํด๊ฒฐ ๋ฐฉ๋ฒ
1. ํฐ๋ฏธ๋์ Command Prompt(cmd)๋ก ๋ณ๊ฒฝ
- Ctrl + Shift + P (๋ช ๋ น ํ๋ ํธ ์ด๊ธฐ)
- Terminal: Select Default Profile ๊ฒ์
- Command Prompt ์ ํ
- ์ ํฐ๋ฏธ๋์ ์ด๊ณ ๋ค์ ์คํ

2. ๊ทธ๋๋ ์ ๋๋ค๋ฉด
- VS Code๋ฅผ ์์ ํ ์ข ๋ฃ ํ ๋ค์ ์คํ
- Node.js๊ฐ ์ ์์ ์ผ๋ก ์ค์น๋์ด ์๋์ง ํ์ธ
๐ก ์ฐธ๊ณ : PowerShell์์๋ ๋๋ถ๋ถ ์ ์์ ์ผ๋ก ์คํ๋๋ค. ํ๊ฒฝ์ ๋ฐ๋ผ ๋ฐ์ํ๋ ๊ฒฝ์ฐ๊ฐ ์๋ค.
ERROR 2. npx.ps1 ์คํ ๊ถํ ์ค๋ฅ

โ ์ค๋ฅ๋ฉ์์ง
PS C:\Users\CafeAlle\Downloads\react-app> npx create-react-app .
npx : ์ด ์์คํ ์์ ์คํฌ๋ฆฝํธ๋ฅผ ์คํํ ์ ์์ผ๋ฏ๋ก C:\Program Files\nodejs\npx.ps1 ํ์ผ์ ๋ก๋ํ ์ ์์ต๋๋ค. ์์ธํ ๋ด์ฉ์ about_Execu
tion_Policies(https://go.microsoft.com/fwlink/?LinkID=135170)๋ฅผ ์ฐธ์กฐํ์ญ์์ค.
์์น ์ค:1 ๋ฌธ์:1
+ npx create-react-app .
+ ~~~
+ CategoryInfo : ๋ณด์ ์ค๋ฅ : ( : ) [ ], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
โ ์์ธ
PowerShell์ ์คํ ์ ์ฑ (Execution Policy)์ด Restricted๋ก ์ค์ ๋์ด ์๊ธฐ ๋๋ฌธ์ด๋ค.

โญ ํด๊ฒฐ ๋ฐฉ๋ฒ
๊ด๋ฆฌ์ ๊ถํ์ผ๋ก Windows PowerShell ์คํ

ํ์ฌ ๊ถํ ํ์ธ
Get-ExecutionPolicy
๊ฒฐ๊ณผ
Restricted

์คํ ๊ถํ ๋ณ๊ฒฝ
Set-ExecutionPolicy RemoteSigned
- ๊ถํ ์ํ RemoteSigned ๋ณ๊ฒฝ.
ํ์ธ ๋ฉ์์ง๊ฐ ๋์ค๋ฉด
Y
- ์ ๋ ฅ ํ Enter.

๋ค์ ํ์ธ
Get-ExecutionPolicy
๊ฒฐ๊ณผ
RemoteSigned

์ดํ VS Code์์ ๋ค์ ์คํํ๋ค.
npx create-react-app .
ERROR 3. TLS/SSL ์ธ์ฆ์ ๊ฒ์ฆ์ ์คํจํ ๊ฒฝ์ฐ

โ ์ค๋ฅ ๋ฉ์์ง
upm error code UNABLE_TO_VERIFY_LEAF_SIGNATURE
upm error errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
upm error request to https://registry.npmjs.org/create-react-app failed, reason: unable to verify the first certificate
upm error A complete log of this rin can be found in: c:\Users\CafeAlle\AppDate\Local\upm-cache\_PS c"\Users\cafeAlle\Downloads\react-app>
โ ์์ธ
ํด๋ผ์ด์ธํธ๊ฐ ์๋ฒ์ ์ธ์ฆ์(leaf certificate)๋ฅผ ์ ๋ขฐํ ์ ์๋ ๋ฃจํธ ์ธ์ฆ์๊น์ง ์ฐ๊ฒฐ(์ธ์ฆ์ ์ฒด์ธ)์ ๊ฒ์ฆํ์ง ๋ชปํ ๋ ๋ฐ์ํ๋ค.
โญ ํด๊ฒฐ ๋ฐฉ๋ฒ

์๋ ๋ช ๋ น์ด๋ฅผ ์คํํ๋ค.
npm config set strict-ssl false

์ดํ CRA ๋ช ๋ น์ ๋ค์ ์คํํ๋ค.
npx create-react-app .

ํ์ธ ๋ฉ์์ง๊ฐ ๋์ค๋ฉด
Y
- ์ ๋ ฅ ํ Enter.

์ดํ VS Code์์ ๋ค์ ์คํ ํ ์ฒดํฌํ๋ค.
๐ก ์ฐธ๊ณ : ์ด ๋ฐฉ๋ฒ์ SSL ์ธ์ฆ์ ๊ฒ์ฌ๋ฅผ ๋นํ์ฑํํ๋ค. ํ์ฌ ํ๋ก์๋ ์ธ์ฆ์ ๋ฌธ์ ๋ก ๋ฐ์ํ๋ ๊ฒฝ์ฐ์๋ง ์์๋ก ์ฌ์ฉํ๋ ๊ฒ์ด ์ข๋ค.
ERROR 4. Port 3000์ด ์ด๋ฏธ ์ฌ์ฉ ์ค์ธ ๊ฒฝ์ฐ
โ ์ค๋ฅ๋ฉ์์ง
Something is already running on port 3000 probably
โ ์์ธ
์ด๋ฏธ ๋ค๋ฅธ ํ๋ก๊ทธ๋จ์ด 3000๋ฒ ํฌํธ๋ฅผ ์ฌ์ฉํ๊ณ ์๋ค.
โญ ํด๊ฒฐ ๋ฐฉ๋ฒ
CRA์์ ๋ค์๊ณผ ๊ฐ์ด ๋ฌป์ต๋๋ค.
Would you like to run the app on another port instead?
Y๋ฅผ ์ ๋ ฅํ๋ฉด ๋ค๋ฅธ ํฌํธ(์: 3001)์์ ์คํ๋ฉ๋๋ค.
ERROR 5. We no longer support global installation of create-react-app
โ ์ค๋ฅ๋ฉ์์ง
We no longer support global installation of create-react-app
โ ์์ธ
์์ ์ create-react-app์ ์ ์ญ(Global)์ผ๋ก ์ค์นํ ๊ฒฝ์ฐ ๋ฐ์ํ๋ ์ค๋ฅ์ด๋ค.
โญ ํด๊ฒฐ ๋ฐฉ๋ฒ
๊ธฐ์กด ์ ์ญ ์ค์น๋ฅผ ์ ๊ฑฐํ๋ค.
npm uninstall -g create-react-app
์ดํ ๋ค์ ์คํํฉ๋๋ค.
npx create-react-app my-app
โ ์ค์น ์ค ๋์ค๋ ๋ฉ์์ง โ
npx๋ฅผ ์ฒ์ ์คํํ๋ฉด ์๋์ ๊ฐ์ ๋ฉ์์ง๊ฐ ๋ํ๋ ์ ์๋ค.
Need to install the following packages:
create-react-app
Ok to proceed? (y)
์ด๊ฒ์ ์ค๋ฅ๊ฐ ์๋๋ค.
npx๊ฐ ํ์ํ ํจํค์ง๋ฅผ ์ผ์์ ์ผ๋ก ๋ค์ด๋ก๋ํด์ ์คํํด๋ ๋๋์ง ๋ฌป๋ ์ ์์ ์ธ ํ์ธ ๋ฉ์์ง์ด๋ค.
Y๋ฅผ ์ ๋ ฅํ๊ณ Enter๋ฅผ ๋๋ฅด๋ฉด ์ค์น๊ฐ ๊ณ์ ์งํ๋๋ค.
๐ ํต์ฌ ์ค๋ฅ ์์ฝํ ๐
| ์ค๋ฅ | ํด๊ฒฐ ๋ฐฉ๋ฒ |
| npx๋ฅผ ์ธ์ํ์ง ๋ชปํจ | ํฐ๋ฏธ๋์ Command Prompt๋ก ๋ณ๊ฒฝํ๊ฑฐ๋ Node.js ์ค์น ํ์ธ |
| npx.ps1 ์คํ ๋ถ๊ฐ | PowerShell ์คํ ์ ์ฑ ์ RemoteSigned๋ก ๋ณ๊ฒฝ |
| UNABLE_TO_VERIFY_LEAF_SIGNATURE | npm config set strict-ssl false ์คํ (ํ์ ์ ์์ ์ฌ์ฉ) |
| Something is already running on port 3000 | ๋ค๋ฅธ ํฌํธ ์ฌ์ฉ(Y) ๋๋ ๊ธฐ์กด ํ๋ก์ธ์ค ์ข ๋ฃ |
| We no longer support global installation... | npm uninstall -g create-react-app ์คํ ํ npx๋ก ๋ค์ ์ค์น |
'<React>' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
| Props (Properties, ํ๋กญ์ค) (0) | 2026.07.07 |
|---|---|
| Component (์ปดํฌ๋ํธ) (0) | 2026.07.07 |
| VS Code์์ React ํ๋ก์ ํธ ์์ฑ (0) | 2026.07.06 |
| Node.js ์ค์น์ CMD&Powershell ์ฌ์ฉ (0) | 2026.07.06 |
| My Directory Setting (0) | 2026.07.06 |
