-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: React.createContext is not a function #20
Comments
Can you describe your environment? node -v
tsc -v
npm ls --depth=0 react react-dom @types/react @types/react-dom @types/node typescript
cat tsconfig.json Also, what framework / bundler are you using? |
Using Next.js, so whatever the default is. node v14.4.0 ├── autoprefixer@10.4.8 |
Updating your node version will solve this error. Your are using node v14.4.0, which is pre-LTS version. The first LTS version in the v14 release was v14.15.0. I'd recommend updating to either v14.20.0 or v16.17.0 |
Great, many thanks for your time for this resolution and for making this amazing package! |
Describe the bug
Server Error
TypeError: React.createContext is not a function
This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
file:///home/liu/Projects/Github-Hypnosis-Events/node_modules/yet-another-react-lightbox/dist/core/contexts/Events.js (3:29)
ModuleJob.run
internal/modules/esm/module_job.js (138:23)
async Loader.import
internal/modules/esm/loader.js (178:24)
Expected behavior
Plug and play
How to reproduce
Not sure, all I did was install the package, use code from example. Then I get this error.
Screenshots / Logs
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: