react-toastify icon indicating copy to clipboard operation
react-toastify copied to clipboard

SyntaxError: The requested module 'react' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export. For example: import pkg from 'react'; const { isValidElement, useRef, useLayoutEffect, useEffect, cloneElement, useReducer, useState, forwardRef } = pkg;

Open darshantank1995 opened this issue 2 years ago • 2 comments

SyntaxError: The requested module 'react' is expected to be of type CommonJS, which does not support named exports. CommonJS modules can be imported by importing the default export. For example: import pkg from 'react'; const { isValidElement, useRef, useLayoutEffect, useEffect, cloneElement, useReducer, useState, forwardRef } = pkg;

darshantank1995 avatar Aug 07 '22 03:08 darshantank1995

Hey @darshantank1995 it would be difficult for me to help you without a reproduction. Repository, setup etc... thanks

fkhadra avatar Aug 07 '22 05:08 fkhadra

I'm having a kinda similar error in a nextjs project with preact as a dep instead of react. Are you having anything similar @darshantank1995?

zephimir avatar Aug 09 '22 15:08 zephimir

Did you fix the problem ? @darshantank1995

Lodennn avatar Nov 14 '22 16:11 Lodennn