๋ด github ํ์ด์ง์ ๋ํด yarn ๋ฐฐํฌ๋ฅผ ์คํํ ๋ ์ด ์นํฉ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
"deploy": "gatsby build --prefix-paths && gh-pages -d public",
error Building static HTML for pages failed`
`See our docs page on debugging HTML builds for help https://goo.gl/yL9lND`
`16 | setHeadComponents = _ref.setHeadComponents;
17 |
> 18 | var sheet = new _styledComponents.ServerStyleSheet();
| ^
19 |
20 | var app = _react2.default.createElement(
21 | _styledComponents.StyleSheetManager,`
`WebpackError: _styledComponents.ServerStyleSheet is not a constructor`
- gatsby-ssr.js:18 Object.exports.replaceRenderer
~/gatsby-plugin-styled-components/gatsby-ssr.js:18:1
- api-runner-ssr.js:23
.cache/api-runner-ssr.js:23:41
- api-runner-ssr.js:21 module.exports
.cache/api-runner-ssr.js:21:25
- static-entry.js:113 module.exports
.cache/static-entry.js:113:3
- static-entry.js:99 Function.Promise.fromNode.Promise.fromCallback
.cache/static-entry.js:99:20
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
gatsby-plugin-styled-components: "2.0.2"
๋ฐ styled-components: "2.2.4"
์์ต๋๋ค.
gatsby-pluging-styled-components๊ฐ SSR์ ์ฒ๋ฆฌํ์ด์ผ ํ์ต๋๊น? ์๋๋ฉด ์ฌ์ ํ ์๋์ผ๋ก ๊ตฌ์ฑํด์ผ ํฉ๋๊น? ๋ช ๋ฌ ์ ์ ๋ด github ํ์ด์ง์ ์ฒซ ๋ฒ์งธ ๋ฒ์ ์ ๋ฐฐํฌํ์ ๋ ์ ๋๋ก ์๋ํ์ต๋๋ค.
๋ฌธ์ ๋ฅผ ๋ซ์ ์ ์์ต๋๋ค. ์คํ์ผ ๊ตฌ์ฑ ์์์ ๋ํ ํผ์ด ์ข ์์ฑ์ ์ค์นํ์ง ์์๊ธฐ ๋๋ฌธ์ ๊นจ๋ฌ์์ต๋๋ค.
@jaanhio ์ด๋ป๊ฒ ํด๊ฒฐํ์ จ๋์? ๋๋ ๊ฐ์ ์ข ๋ฅ์ ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค.
TypeError: _material_ui_core_styles__WEBPACK_IMPORTED_MODULE_10__.ServerStyleSheets is not a constructor
at eval (webpack:///./server/helpers/renderer.js?:37:16)
at eval (webpack:///./server/index.js?:54:81)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Google์์ ์ฌ๊ธฐ์ ์ค๋ ๋ชจ๋ ์ฌ๋์ ์ํด ....
@material-ui/core/styles๊ฐ ์ค์ ๋ก ServerStyleSheets๋ฅผ ๋ด๋ณด๋ด๋์ง ํ์ธํ์ญ์์ค.
์ด๊ฒ์ ๋ด๊ฐ ๋ ์ค๋๋ material-ui/core(3.9.x)๋ฅผ ์คํํ๊ณ ์๋ค๋ ๊ฒ์ ๊นจ๋ซ๊ฒ ํฉ๋๋ค.
4.5.1๋ก ์
๊ทธ๋ ์ด๋ํ์ฌ ์์ ๋จ
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
Google์์ ์ฌ๊ธฐ์ ์ค๋ ๋ชจ๋ ์ฌ๋์ ์ํด ....
@material-ui/core/styles๊ฐ ์ค์ ๋ก ServerStyleSheets๋ฅผ ๋ด๋ณด๋ด๋์ง ํ์ธํ์ญ์์ค.
์ด๊ฒ์ ๋ด๊ฐ ๋ ์ค๋๋ material-ui/core(3.9.x)๋ฅผ ์คํํ๊ณ ์๋ค๋ ๊ฒ์ ๊นจ๋ซ๊ฒ ํฉ๋๋ค.
4.5.1๋ก ์ ๊ทธ๋ ์ด๋ํ์ฌ ์์ ๋จ