小编Ama*_*Jat的帖子

需要 ext-xml * -> 您的系统中缺少该文件。安装或启用 PHP 的 xml 扩展

我正在学习 Laravel。但运行命令后composer update它向我显示此错误。

我已经这样做了 ->apt-get install php7.4-xml并且apt-get install php-xml

我只是想知道应该将哪一行添加到文件 php.ini 中以启用 PHP 的 xml 扩展。提前致谢。

php--version 

PHP 7.4.22 (cli) (built: Jul 30 2021 13:08:17) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.22, Copyright (c), by Zend Technologies
Run Code Online (Sandbox Code Playgroud)

的结果composer udpate

    aman@aman-HP-Notebook:~/AMAN/learnLaravel$ composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set …
Run Code Online (Sandbox Code Playgroud)

php xml

14
推荐指数
2
解决办法
2万
查看次数

类型“IntrinsicAttributes & IntrinsicClassAttributes<ThemeProvider>”上不存在属性“children”

ThemeProviderreact-native-elements不允许儿童。

这是代码:

const Root = () => {
  const {theme, isNewUser} = Settings.useContainer();
  const darkMode = useMemo(() => theme === 'dark', [theme]);
  return (
    <ThemeProvider theme={darkMode ? darkTheme : lightTheme} useDark={darkMode}>
      {isNewUser ? <OnboardingStack /> : <BottomTab />}
    </ThemeProvider>
  );
};
Run Code Online (Sandbox Code Playgroud)

ThemeProvider 有红色下划线,悬停时显示

Type '{ children: Element; theme: RCTheme; useDark: boolean; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ThemeProvider> & Pick<Readonly<ThemeProviderProps>, never> & InexactPartial<...> & InexactPartial<...>'.
  Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ThemeProvider> …
Run Code Online (Sandbox Code Playgroud)

typescript react-native react-native-elements

5
推荐指数
1
解决办法
1266
查看次数