我正在尝试启动React-Native项目。
在终端中我所做的仅有的两个命令是:
npx create-expo-app rate-repository-app --template expo-template-blank@sdk-46
和
npx expo install react-native-web@~0.18.7 react-dom@18.2.0 @expo/webpack-config@^0.17.0
我得到了以下错误:
ValidationError: Invalid options object. Dev Server has been initialized using an options object that does not match the API schema.
- options has an unknown property 'mimeTypes'. These properties are valid:
object { allowedHosts?, bonjour?, client?, compress?, devMiddleware?, headers?, historyApiFallback?, host?, hot?, http2?, https?, ipc?, liveReload?, magicHtml?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, server?, setupExitSignals?, setupMiddlewares?, static?, watchFiles?, webSocketServer? }
我想做的只是开始一个项目--除此之外我什么也没做。
如何避免错误?
1条答案
按热度按时间isr3a4wc1#
将webpack-dev-server降级到3.10.1
似乎React Native无法与webpack-dev-server〉4.0.0一起使用