VulcanJS / Vulcan

🌋 A toolkit to quickly build apps with React, GraphQL & Meteor
http://vulcanjs.org
MIT License
7.98k stars 1.89k forks source link

useCookies is not a function or its return value is not iterable #2698

Closed vipinlahoti closed 3 years ago

vipinlahoti commented 3 years ago

Describe the bug useCookies is not a function or its return value is not iterable

To Reproduce Steps to reproduce the behavior: fresh pull from 'master' branch and yarn install.

Device (if applicable):

Additional context Error while server-rendering. date: Mon Mar 15 2021 18:38:19 GMT+0530 (India Standard Time) url: [object Object] TypeError: useCookies is not a function or its return value is not iterable at useLocaleData (packages/vulcan:core/lib/modules/containers/localeData.js:29:21) at withLocaleData (packages/vulcan:core/lib/modules/containers/localeData.js:43:22) at processChild (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/react-dom/cjs/react-dom-server.node.development.js:3204:14) at resolve (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/react-dom/cjs/react-dom-server.node.development.js:3124:5) at ReactDOMServerRenderer.render (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/react-dom/cjs/react-dom-server.node.development.js:3598:22) at ReactDOMServerRenderer.read (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/react-dom/cjs/react-dom-server.node.development.js:3536:29) at renderToStaticMarkup (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/react-dom/cjs/react-dom-server.node.development.js:4261:27) at /Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/@apollo/client/react/ssr/ssr.cjs.js:81:21 at new Promise () at process (/Users/vipin.lahoti/Documents/meteor/Vulcan/node_modules/@apollo/client/react/ssr/ssr.cjs.js:79:16) at /Users/vipin.lahoti/.meteor/packages/promise/.0.11.2.1xavwef.9sbp++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40 => awaited here: at Function.Promise.await (/Users/vipin.lahoti/.meteor/packages/promise/.0.11.2.1xavwef.9sbp++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/promise_server.js:56:12) at packages/vulcan:lib/lib/server/apollo-ssr/renderPage.js:61:7 at /Users/vipin.lahoti/.meteor/packages/promise/.0.11.2.1xavwef.9sbp++os+web.browser+web.browser.legacy+web.cordova/npm/node_modules/meteor-promise/fiber_pool.js:43:40

ErikDakoda commented 3 years ago

It sound like you need to add the react-cookie NPM package to your project

eric-burel commented 3 years ago

Yeah the starter has been updated with this, it's always the reference (there is no known way to keep them in sync sorry, and there were no libraries to do that last time I checked)