Hello, I'm trying to use the reactjs-social-login in a NextJs application and I'm facing with a error while I'm trying execute the component FacebookSocialLogin.
Basically, when I try execute it, I get this error:
Error: require() of ES Module /home/tiagocardosoc/workspace/beduka-web-ssr/node_modules/reactjs-social-login/dist/reactjs-social-login.js from xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js not supported.
reactjs-social-login.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules.
Instead rename reactjs-social-login.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /xxxxxxxxxxxxxxxxxxxxxxxxx/node_modules/reactjs-social-login/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
Hello, I'm trying to use the reactjs-social-login in a NextJs application and I'm facing with a error while I'm trying execute the component FacebookSocialLogin.
Basically, when I try execute it, I get this error:
Error: require() of ES Module /home/tiagocardosoc/workspace/beduka-web-ssr/node_modules/reactjs-social-login/dist/reactjs-social-login.js from xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.js not supported. reactjs-social-login.js is treated as an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which declares all .js files in that package scope as ES modules. Instead rename reactjs-social-login.js to end in .cjs, change the requiring code to use dynamic import() which is available in all CommonJS modules, or change "type": "module" to "type": "commonjs" in /xxxxxxxxxxxxxxxxxxxxxxxxx/node_modules/reactjs-social-login/package.json to treat all .js files as CommonJS (using .mjs for all ES modules instead).
I'm not using modules in my app. Any Idea?