Closed ghost closed 2 years ago
Are you using Next.js or any other framework?
Closing this issue due to no response
I've get this error too, I'm using NextJs
Reopen please. Also get the Error in React App on Node Server.
[nodemon] 1.19.1
[nodemon] to restart at any time, enter rs
[nodemon] watching: public/node/*/
[nodemon] starting node public/node/server.js --experimental-modules
/node_modules/react-simple-captcha/react-simple-captcha.js:1
import { Component } from 'react';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object.
Check it at my end it's working fine.
Kindly recheck your code.
Thank you.
Are you using Next.js or any other framework?
Yes I am using NextJs and it is giving the same error
It is not compatible with NextJS Framework yet. I do have making it compatible with NextJS in the future.
Than you.
It is not compatible with NextJS Framework yet. I do have making it compatible with NextJS in the future.
Than you.
Hi, I think u complete the Next js version because now is 2024 how to use ?
Here is the solution: https://github.com/masroorejaz/react-simple-captcha/issues/32
O Its working.Thanks dear.
SyntaxError: Cannot use import statement outside a module
This error happened while generating the page. Any console logs will be displayed in the terminal window. Source react-simple-captcha (1:0) @ eval
module.exports = require("react-simple-captcha");