GatsbyJS build process when react-fullpage is used in the project ends in an Invariant Violation 130 error. Development works without any problems.
react-fullpage: https://github.com/alvarotrigo/react-fullpage
Build a GatsbyJS with react-fullpage.
Example repository: https://github.com/ValidRobot/gatsby_react-fullPage_Invariant-Violation-130
Build process should work
Build process ends in an Invariant Violation #130 error
System:
OS: Linux 4.16 Fedora 26 (Workstation Edition) 26 (Workstation Edition)
CPU: x64 Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz
Shell: 5.3.1 - /usr/bin/zsh
Binaries:
Node: 8.11.3 - ~/.nvm/versions/node/v8.11.3/bin/node
Yarn: 1.9.4 - /usr/bin/yarn
npm: 5.6.0 - ~/.nvm/versions/node/v8.11.3/bin/npm
Browsers:
Chrome: 69.0.3497.100
Firefox: 60.0
npmPackages:
gatsby: ^2.0.0 => 2.0.19
npmGlobalPackages:
gatsby-cli: 1.1.58
@ValidRobot As per the documentation of react-fullpage
, you are supposed to import it the following way(commonjs build) when using SSR or pre-rendering the pages:
import ReactFullpage from '@fullpage/react-fullpage/dist/react-fullpage-commonjs';
You can also remove the gatsby-node.js
after changing the import as above. This should fix the issue for you.
Most helpful comment
@ValidRobot As per the documentation of
react-fullpage
, you are supposed to import it the following way(commonjs build) when using SSR or pre-rendering the pages:You can also remove the
gatsby-node.js
after changing the import as above. This should fix the issue for you.