react-native-static-server
react-native-static-server copied to clipboard
TypeError: null is not an object (evaluating 'FPStaticServer.start')
When I run server.start, I get an error
Bug
Code
Version Info
Any solution on this error?
I was getting this error when I was trying to spin up the static server while running in Expo Go. Building for native platforms with react-native run-ios
|| react-native run-android
solved it for me.
@shynonagons how are you developing if Expo Go is not building? Maybe a custom dev-client could work?
@dohomi In short, I don’t use expo-system anymore, I use react-native-system. Also, I use declare module'react-native-static-server'.
@dohomi This module uses native code, so you can't run it in Expo Go. If you need to use it in an Expo project you'll have to eject first with expo eject
.
@fungmo for the types I just copied the contents of the index.d.ts
file in this repo into react-native-static-server.d.ts
in my project, since it doesn't seem like the release with Typescript support has been cut yet.
I have the same problem, i'm using bare react native. I'm using react-native-fs from a module i linked in my app from an another private github project and i have the same issue when i want to start static server to launch a webview in my project.