geelen / react-snapshot

A zero-configuration static pre-renderer for React apps
MIT License
1.66k stars 104 forks source link

Invariant Violation on jsdom while using react-snapshot #135

Closed PixeledCode closed 3 years ago

PixeledCode commented 3 years ago

Error number is 1 which doesn't really describes the issue... This is what I am getting:

`Starting crawling http://localhost:42487/ Error: Uncaught [Invariant Violation: Invariant Violation: 1 (see https://github.com/apollographql/invariant-packages)]

at reportException (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:58:24)

at processJavaScript (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js:130:7)

at HTMLScriptElementImpl._eval (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js:65:7)

at /home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:31:22

at Object.check (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:89:11)

at Object.check (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:92:23)

at /home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/living/nodes/Document-impl.js:108:12

at wrappedEnqueued (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:255:16)

at Request.request [as _callback] (/home/ancient/git/tron/node_modules/react-snapshot/node_modules/jsdom/lib/jsdom/browser/resource-loader.js:203:9)

at Request.self.callback (/home/ancient/git/tron/node_modules/request/request.js:185:22) { Invariant Violation: Invariant Violation: 1 (see https://github.com/apollographql/invariant-packages)

at new t (http://localhost:42487/static/js/2.9e9314d1.chunk.js:2:45421)

at http://localhost:42487/static/js/2.9e9314d1.chunk.js:2:1846325

at w (http://localhost:42487/static/js/2.9e9314d1.chunk.js:2:1846337)

at new t (http://localhost:42487/static/js/2.9e9314d1.chunk.js:2:1849278)

at Module.494 (http://localhost:42487/static/js/main.a6c3ac6a.chunk.js:1:13797)

at l (http://localhost:42487/:1:561)

at Object.240 (http://localhost:42487/static/js/main.a6c3ac6a.chunk.js:1:3817)

at l (http://localhost:42487/:1:561)

at t (http://localhost:42487/:1:430)

at Array.r [as push] (http://localhost:42487/:1:293) framesToPop: 1, name: 'Invariant Violation' }

🔥 'render' from react-snapshot was never called. Did you replace the call to ReactDOM.render()?

🕸 Finished crawling. `