I was using npx create-expo-app StickerSmash --template blank to create an expo project sdk 51, but it is not working with error Cannot read property 'useContext' of null
Expected Behavior
No response
Steps To Reproduce
Create a new Expo project with sdk 51. command: npx create-expo-app StickerSmash --template blank
Get an error message:
TypeError: Cannot read property 'useContext' of null
ERROR Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
ERROR Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
You might have mismatching versions of React and the renderer (such as React DOM)
You might be breaking the Rules of Hooks
You might have more than one copy of React in the same app
See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.
ERROR TypeError: Cannot read property 'useContext' of null
This error is located at:
in Skeleton
in SkeletonExpo (created by App)
in RCTView (created by View)
in View (created by App)
in RCTView (created by View)
in View (created by App)
in App (created by withDevTools(App))
in withDevTools(App)
in RCTView (created by View)
in main(RootComponent), js engine: hermes
ERROR TypeError: Cannot read property 'useContext' of null
For some reasons I have tried to use the solution from #189, but it did not work I tried again the next day with the exact same steps and it did work.
my apology.
Is there an existing issue for this?
Do you want this issue prioritized?
Current Behavior
I was using npx create-expo-app StickerSmash --template blank to create an expo project sdk 51, but it is not working with error Cannot read property 'useContext' of null
Expected Behavior
No response
Steps To Reproduce
ERROR Warning: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
This error is located at: in Skeleton in SkeletonExpo (created by App) in RCTView (created by View) in View (created by App) in RCTView (created by View) in View (created by App) in App (created by withDevTools(App)) in withDevTools(App) in RCTView (created by View) in main(RootComponent), js engine: hermes ERROR TypeError: Cannot read property 'useContext' of null
Versions
Screenshots
Reproduction
https://codesandbox.io/p/github/yousefturin/Bug-report-moti/master?file=%2Fpackage.json%3A4%2C30&workspaceId=8bcfb81d-12cd-4e3c-8fa1-5b7bd94dab01 To connect a mobile the run command must be npx expo start --tunnel and the error will show.