ํ๋ก์ ํธ์์ react-fullpage๊ฐ ์ฌ์ฉ๋ ๋ GatsbyJS ๋น๋ ํ๋ก์ธ์ค๋ Invariant Violation 130 ์ค๋ฅ๋ก ๋๋ฉ๋๋ค. ๊ฐ๋ฐ์ ๋ฌธ์ ์์ด ์๋ํฉ๋๋ค.
react-fullpage : https://github.com/alvarotrigo/react-fullpage
react-fullpage๋ก GatsbyJS๋ฅผ ๋น๋ํ์ธ์.
์์ ์ ์ฅ์ : https://github.com/ValidRobot/gatsby_react-fullPage_Invariant-Violation-130
๋น๋ ํ๋ก์ธ์ค๊ฐ ์๋ํด์ผํฉ๋๋ค.
๋น๋ ํ๋ก์ธ์ค๊ฐ Invariant Violation # 130 ์ค๋ฅ๋ก ์ข ๋ฃ๋ฉ๋๋ค.
์ฒด๊ณ:
์ด์์ฒด์ : Linux 4.16 Fedora 26 (Workstation Edition) 26 (Workstation Edition)
CPU : x64 Intel (R) Core (TM) i5-4210U CPU @ 1.70GHz
์
ธ : 5.3.1-/ usr / bin / zsh
๋ฐ์ด๋๋ฆฌ :
๋
ธ๋ : 8.11.3-~ / .nvm / versions / node / v8.11.3 / bin / node
์์ฌ : 1.9.4-/ usr / bin / yarn
npm : 5.6.0-~ / .nvm / versions / node / v8.11.3 / bin / npm
๋ธ๋ผ์ฐ์ :
ํฌ๋กฌ : 69.0.3497.100
Firefox : 60.0
npm ํจํค์ง :
๊ฐ์ธ ๋น : ^ 2.0.0 => 2.0.19
npmGlobalPackages :
gatsby-cli : 1.1.58
@ValidRobot react-fullpage
์ ๋ฌธ์ ์ ๋ฐ๋ผ SSR์ ์ฌ์ฉํ๊ฑฐ๋ ํ์ด์ง๋ฅผ ๋ฏธ๋ฆฌ ๋ ๋๋ง ํ ๋ ๋ค์ ๋ฐฉ๋ฒ (commonjs ๋น๋)์ผ๋ก ๊ฐ์ ธ์์ผํฉ๋๋ค.
import ReactFullpage from '@fullpage/react-fullpage/dist/react-fullpage-commonjs';
์์ ๊ฐ์ด ๊ฐ์ ธ ์ค๊ธฐ๋ฅผ ๋ณ๊ฒฝ ํ ํ gatsby-node.js
์ ๊ฑฐ ํ ์๋ ์์ต๋๋ค. ๊ทธ๋ฌ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ ๋ ๊ฒ์
๋๋ค.
๊ฐ์ฅ ์ ์ฉํ ๋๊ธ
@ValidRobot
react-fullpage
์ ๋ฌธ์ ์ ๋ฐ๋ผ SSR์ ์ฌ์ฉํ๊ฑฐ๋ ํ์ด์ง๋ฅผ ๋ฏธ๋ฆฌ ๋ ๋๋ง ํ ๋ ๋ค์ ๋ฐฉ๋ฒ (commonjs ๋น๋)์ผ๋ก ๊ฐ์ ธ์์ผํฉ๋๋ค.์์ ๊ฐ์ด ๊ฐ์ ธ ์ค๊ธฐ๋ฅผ ๋ณ๊ฒฝ ํ ํ
gatsby-node.js
์ ๊ฑฐ ํ ์๋ ์์ต๋๋ค. ๊ทธ๋ฌ๋ฉด ๋ฌธ์ ๊ฐ ํด๊ฒฐ ๋ ๊ฒ์ ๋๋ค.