์ฐ๋ฆฌ๊ฐ ๋น์ ์ ๋ ์ฝ๊ฒ ๋์ธ ์ ์๋๋ก ๊ฐ๋ฅํ ํ ๋ง์ ์ ์ฉํ ์ ๋ณด๋ฅผ ํฌํจํ์ญ์์ค. ์ ์ฉํ ๋งํฌ: - ๋ฌธ์: https://www.gatsbyjs.org/docs/ Gatsby์๋ ์ฌ๋ฌ ์ปค๋ฎค๋ํฐ ์ง์ ์ฑ๋์ด ์์ต๋๋ค. - Discord: https://gatsby.app/discord - Spectrum: https:// spectrum.chat/gatsby-js - Twitter: https://twitter.com/gatsbyjs ์๋ก์ด ์ด์๋ฅผ ์ด๊ธฐ ์ ์ ๊ธฐ์กด ์ด์๋ฅผ ๊ฒ์ํ์ธ์ https://github.com/gatsbyjs/gatsby/issues
Gatsby build
๋ WebpackError: Invariant Violation: Minified React error #62
์ค๋ฅ๋ฅผ ๋ฐ์์ํค๊ณ , gatsby ๊ฐ๋ฐ์ ํ๋ gatsby develop works fine
์๋ ๋ฌธ์ ์์ด ์๋ํฉ๋๋ค.
error Building static HTML for pages failed
See our docs page on debugging HTML builds for help https://gatsby.app/debug-html
8 | else
9 | root["lib"] = factory(root["@reach/router"], root["core-js/modules/es6.array.iterator"], root["core-js/modules/es6.array.sort"], root["core-js/modules/es6.function.name"], root["core-js/modules/es6.map"], root["core-js/modules/es6.object.assign"], root["core-js/modules/es6.regexp.constructor"], root["core-js/modules/es6.regexp.split"], root["core-js/modules/es6.regexp.to-string"], root["core-js/modules/es6.string.ends-with"], root["core-js/modules/es6.string.iterator"], root["core-js/modules/web.dom.iterable"], root["fs"], root["lodash"], root["path"], root["react"], root["react-dom/server"], root["react-helmet"]);
> 10 | })(this, function(__WEBPACK_EXTERNAL_MODULE__reach_router__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_iterator__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_array_sort__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_function_name__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_map__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_object_assign__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_constructor__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_split__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_regexp_to_string__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_string_ends_with__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_es6_string_iterator__, __WEBPACK_EXTERNAL_MODULE_core_js_modules_web_dom_iterable__, __WEBPACK_EXTERNAL_MODULE_fs__, __WEBPACK_EXTERNAL_MODULE_lodash__, __WEBPACK_EXTERNAL_MODULE_path__, __WEBPACK_EXTERNAL_MODULE_react__, __WEBPACK_EXTERNAL_MODULE_react_dom_server__, __WEBPACK_EXTERNAL_MODULE_react_helmet__) {
| ^
11 | return
WebpackError: Invariant Violation: Minified React error #62; visit https://reactjs.org/docs/error-decoder.html?invariant=62&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
์ด๊ฒ์ ๋ด๊ฐ๋ฐ๋ ์ ์ฒด ์ค๋ฅ ๋ฉ์์ง์
๋๋ค. ์ ์ฒด React ์ค๋ฅ ๋ฉ์์ง์ ์ค๋ช
๋ ๊ฒ์ฒ๋ผ ์คํ์ผ ์์ฑ์ ์๋ชป๋ ๋งคํ์ ๋ชจ๋ ์ ๊ฑฐํ๋ ค๊ณ ์๋ํ์ง๋ง ๋ฌธ์ ๋ ์ฌ์ ํ ์ง์๋ฉ๋๋ค. .cache
๋ ์ญ์ ํ์ต๋๋ค.
์ด์ ์ ์ฑ๊ณต์ ์ผ๋ก ๋น๋ํ ์ ์์๊ณ ๋ฉ์์ง๊ฐ ๋ด ์ฝ๋์ ๋ฌด์์ด ์๋ชป๋์๋์ง์ ๋ํ ํต์ฐฐ๋ ฅ์ ๋ ์ด์ ์ ๊ณตํ์ง ์๊ธฐ ๋๋ฌธ์ ๋ฌธ์ ๊ฐ ๋ ์ ์๋ ๋ค๋ฅธ ๊ฒ์ด ๋ฌด์์ธ์ง ๋ชจ๋ฅด๊ฒ ์ต๋๋ค. ํนํ gatsby develop
์๋ฒฝํ๊ฒ ์คํํ ์ ์๊ธฐ ๋๋ฌธ์
๋๋ค.
```
์ฒด๊ณ:
์ด์ ์ฒด์ : macOS 10.14.2
CPU: (8) x64 Intel(R) Core(TM) i7-4750HQ CPU @ 2.00GHz
์
ธ: 3.2.57 - /bin/bash
๋ฐ์ด๋๋ฆฌ:
๋
ธ๋: 11.7.0 - /usr/local/bin/node
์์ฌ: 1.13.0 - /usr/local/bin/yarn
npm: 6.5.0 - /usr/local/bin/npm
์ธ์ด:
ํ์ด์ฌ: 2.7.10 - /usr/bin/python
๋ธ๋ผ์ฐ์ :
ํฌ๋กฌ: 71.0.3578.98
์ฌํ๋ฆฌ: 12.0.2
npmํจํค์ง:
๊ฐ์ธ ๋น: ^2.0.76 => 2.0.76
๊ฐ์ธ ๋น ์ด๋ฏธ์ง: ^2.0.20 => 2.0.25
๊ฐ์ธ ๋น ํ๋ฌ๊ทธ์ธ ๋งค๋ํ์คํธ: ^2.0.9 => 2.0.12
๊ฐ์ธ ๋น ํ๋ฌ๊ทธ์ธ ์คํ๋ผ์ธ: ^2.0.16 => 2.0.20
๊ฐ์ธ ๋น ํ๋ฌ๊ทธ์ธ ๋ฐ์ ํฌ๋ฉง: ^3.0.2 => 3.0.5
๊ฐ์ธ ๋น ํ๋ฌ๊ทธ์ธ ์คํ: ^2.0.14 => 2.0.16
๊ฐ์ธ ๋น ์์ค ํ์ผ ์์คํ
: ^2.0.8 => 2.0.12
๊ฐ์ธ ๋น ํธ๋์คํฌ๋จธ ์คํ: ^2.1.8 => 2.1.9
### File contents (if changed)
`gatsby-config.js`:<!-- Please use a code block or just leave it as is if wasn't changed -->
module.exports = {
์ฌ์ดํธ๋ฉํ๋ฐ์ดํฐ: {
์ ๋ชฉ: Gatsby Starter
,
์ค๋ช
: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
,
์์ฑ์: @gatsbyjs
,
์์
๋งํฌ: [
{
์ด๋ฆ: Link 1
,
URL: https://twitter.com/
,
},
{
์ด๋ฆ: link 2
,
URL: https://github.com/
,
}
],
ํน์ง: [
{
์ ๋ชฉ: Feature 1
,
์ค๋ช
: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
,
},
{
์ ๋ชฉ: Feature 2
,
์ค๋ช
: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
,
},
{
์ ๋ชฉ: Feature 3
,
์ค๋ช
: Kick off your next, great Gatsby project with this default starter. This barebones starter ships with the main Gatsby configuration files you might need.
,
},
],
},
ํ๋ฌ๊ทธ์ธ: [
gatsby-plugin-react-helmet
,
{
ํด๊ฒฐ: gatsby-source-filesystem
,
์ต์
: {
์ด๋ฆ: images
,
๊ฒฝ๋ก: ${__dirname}/src/images
,
},
},
gatsby-transformer-sharp
,
gatsby-plugin-sharp
,
{
ํด๊ฒฐ: gatsby-plugin-manifest
,
์ต์
: {
์ด๋ฆ: gatsby-starter-default
,
short_name: starter
,
์์ URL: /
,
background_color: #663399
,
theme_color: #663399
,
๋์คํ๋ ์ด: minimal-ui
,
icon: src/images/gatsby-icon.png
, // ์ด ๊ฒฝ๋ก๋ ์ฌ์ดํธ์ ๋ฃจํธ์ ์๋์ ์
๋๋ค.
},
},
// ์ด (์ ํ ์ฌํญ) ํ๋ฌ๊ทธ์ธ์ ํ๋ก๊ทธ๋ ์๋ธ ์น ์ฑ + ์คํ๋ผ์ธ ๊ธฐ๋ฅ์ ํ์ฑํํฉ๋๋ค.
// ์์ธํ ์์๋ณด๋ ค๋ฉด https://gatsby.app/offline์ ๋ฐฉ๋ฌธ
// '๊ฐ์ธ ๋น ํ๋ฌ๊ทธ์ธ ์คํ๋ผ์ธ',
],
}
`package.json`:<!-- Please use a code block or just leave it as is if wasn't changed -->
{
"์ด๋ฆ": "gatsby-starter-default",
"๋น๊ณต๊ฐ": ์ฌ์ค,
"description": "Gatsby์ ํจ๊ป ๋น ๋ฅด๊ฒ ์์ํ๊ณ ๊ฐ๋ฐํ ์ ์๋ ๊ฐ๋จํ ์คํํฐ",
"๋ฒ์ ": "0.1.0",
"์ ์": "Kyle Mathews [email protected] ",
"์ข
์์ฑ": {
"๊ฐ์ธ ๋น": "^2.0.76",
"๊ฐ์ธ ๋น ์ด๋ฏธ์ง": "^2.0.20",
"gatsby-plugin-manifest": "^2.0.9",
"gatsby-plugin-offline": "^2.0.16",
"gatsby-plugin-react-helmet": "^3.0.2",
"gatsby-plugin-sharp": "^2.0.14",
"๊ฐ์ธ ๋น ์์ค ํ์ผ ์์คํ
": "^2.0.8",
"๊ฐ์ธ ๋น ํธ๋์คํฌ๋จธ ์คํ": "^2.1.8",
"์ํ ์ ํ": "^15.6.2",
"๋ฐ์": "^16.6.3",
"react-dom": "^16.6.3",
"๋ฐ์ ํฌ๋ฉง": "^5.2.0"
},
"ํค์๋": [
"๊ฐ์ธ ๋น"
],
"๋ผ์ด์ผ์ค": "MIT",
"์คํฌ๋ฆฝํธ": {
"๋น๋": "๊ฐ์ธ ๋น ๋น๋",
"๊ฐ๋ฐํ๋ค": "๊ฐ์ธ ๋น ๊ฐ๋ฐํ๋ค",
"์์": "npm ์คํ ๊ฐ๋ฐ",
"ํ์": "๋ ์์ --write \"src/ */ .js\"",
"test": "์์ฝ \"ํ
์คํธ๋ฅผ ์์ฑํ์ญ์์ค! -> https://gatsby.app/unit-testing\ ""
},
"devDependencies": {
"๋ ์์๋ค": "^1.15.2"
},
"์ ์ฅ์": {
"์ ํ": "git",
"url": " https://github.com/gatsbyjs/gatsby-starter-default "
},
"๋ฒ๊ทธ": {
"url": " https://github.com/gatsbyjs/gatsby/issues "
}
}
``
gatsby-node.js : N/A <!-- Please use a code block or just leave it as is if wasn't changed -->
gatsby-browser.js : N/A <!-- Please use a code block or just leave it as is if wasn't changed -->
gatsby-ssr.js`: N/A
~ @AlexanderProd ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋น์ ์ ์์ธ์ ๋ฌด์์ด์์ต๋๊น?
์ ๊ฒฝ์ฐ์ง ๋ง์ธ์, ์ ๊ฒฝ์ฐ์๋
bodyAttributes={{
style: 'some style string'
}}
์๋ ์์ฑ๋ SEO.js
์ <Helmet />
์ธ์คํด์ค ๋ด๋ถ. ์คํ์ผ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ๋ฉด ์๋ํ์ง ์์ต๋๋ค. ๋ฐ์ ํฌ๋ฉง์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค. ๋ด ์คํ์ผ์ ํด๋์ค๋ก ๋ณํํ๊ณ ๋์ ์ฌ์ฉํ๋ฉด ๋ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค.
Google์ ํตํด ๋์ฐฉํ ๋ค๋ฅธ ์ฌ์ฉ์์ ๊ฒฝ์ฐ ์ค๋ฅ๋ ์๋ชป๋ style
ํธ์ถ์
๋๋ค(์ฆ, ๋ฌธ์์ด์ ์ฌ์ฉํ์ง ์๊ณ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉ).
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
~ @AlexanderProd ๋์ผํ ๋ฌธ์ ๊ฐ ๋ฐ์ํ์ต๋๋ค. ๋น์ ์ ์์ธ์ ๋ฌด์์ด์์ต๋๊น?
์ ๊ฒฝ์ฐ์ง ๋ง์ธ์, ์ ๊ฒฝ์ฐ์๋
์๋ ์์ฑ๋
SEO.js
์<Helmet />
์ธ์คํด์ค ๋ด๋ถ. ์คํ์ผ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉํ๋ฉด ์๋ํ์ง ์์ต๋๋ค. ๋ฐ์ ํฌ๋ฉง์ ๋ฌธ์ ๋ผ๊ณ ์๊ฐํฉ๋๋ค. ๋ด ์คํ์ผ์ ํด๋์ค๋ก ๋ณํํ๊ณ ๋์ ์ฌ์ฉํ๋ฉด ๋ด ๋ฌธ์ ๊ฐ ํด๊ฒฐ๋์์ต๋๋ค.Google์ ํตํด ๋์ฐฉํ ๋ค๋ฅธ ์ฌ์ฉ์์ ๊ฒฝ์ฐ ์ค๋ฅ๋ ์๋ชป๋
style
ํธ์ถ์ ๋๋ค(์ฆ, ๋ฌธ์์ด์ ์ฌ์ฉํ์ง ์๊ณ ๊ฐ์ฒด๋ฅผ ์ฌ์ฉ).