Running into the following error when trying to build a Next.js app:
TypeError: js_cookie__WEBPACK_IMPORTED_MODULE_2__.default.getJSON is not a function
This error has to do with using an incompatible version of the
js-cookie npm package. Change the version of
2.2.1 in order to resolve this error like so:
npm uninstall js-cookie npm install firstname.lastname@example.org npm run dev // run the development server to ensure the error is solved
Well that’s all for today, I hope you found this article helpful. Thanks so much for reading my article! Feel free to follow me on Twitter and GitHub, connect with me on LinkedIn and subscribe to my YouTube channel.