小编Ish*_*Man的帖子

错误:多个模块匹配.使用skip-import选项跳过将组件导入最近的模块

当我尝试在角度cli中创建一个组件时,它向我显示了这个错误.我怎么摆脱它?

错误:多个模块匹配.使用skip-import选项跳过将组件导入最近的模块.

我正在使用angular cli版本:1.4.1

angular

233
推荐指数
12
解决办法
19万
查看次数

undefined不是对象(评估'RNGestureHandlerModule.State'

我在我的React Native项目中安装了react-navigation.它的启动项目没有任何代码.但是在运行项目时我遇到了这样的错误.

这是我的导航代码

import { createStackNavigator } from 'react-navigation';

import Home from './screens/Home';
import WeatherDetail from './screens/WeatherDetail';


const Navigation = createStackNavigator({
  Home: { screen: Home },
  WeatherDetail: {
  screen: WeatherDetail
 } 
});

export default Navigation;
Run Code Online (Sandbox Code Playgroud)

这是App.js代码

 import Navigator from './Router';


 export default class App extends Component {
   render() {
     return (
       <View style={styles.container}>
         <Navigator />
       </View>
     );
    }
  }
Run Code Online (Sandbox Code Playgroud)

如果我从App.js中删除导航器组件并将其替换为Text,则应用程序运行时不会出现任何错误.

react-native react-navigation

39
推荐指数
3
解决办法
4万
查看次数

Sentry 报告错误:无效令牌(http 状态:401) - Sentry NextJs

在我的项目中集成哨兵后,开发环境工作正常,但是当我尝试构建项目时,yarn build我遇到了这个错误。

Sentry CLI 插件:命令失败:/Users/ishman/Desktop/sh/web-speedhome/node_modules/@sentry/cli/sentry-cli 发布新的 RUwbSqUhmn7T-kxjDJebz 错误:API 请求失败,原因是:sentry 报告错误:无效令牌(http状态:401)

添加 --log-level=[info|debug] 或 export SENTRY_LOG_LEVEL=[info|debug] 以查看更多输出。请将完整的调试日志附加到所有错误报告中。

我的哨兵配置文件

import * as Sentry from '@sentry/nextjs'
import { SENTRY_DSN } from './env'

Sentry.init({
  dsn: SENTRY_DSN,

  tracesSampleRate: 1,
  integrations: [new Sentry.BrowserTracing({})],

})
Run Code Online (Sandbox Code Playgroud)

和我的 Sentry.properties 文件

defaults.url=https://sentry.io/
defaults.org=org
defaults.project=project
auth.token=token
Run Code Online (Sandbox Code Playgroud)

cli.executable=../../../.npm/_npx/a8388072043b4cbc/node_modules/@sentry/cli/bin/sentry-cli

sentry reactjs next.js

10
推荐指数
0
解决办法
9724
查看次数

NextJs 应用程序 CPU 使用率 100%

pm2 后面的所有 8 个节点上的 CPU 使用率很容易飙升。它在新启动时表现良好,但随着时间的推移,它似乎会显着退化。内存占用很好,通常最高在 300MB 左右。

node.js next.js

6
推荐指数
0
解决办法
4021
查看次数

borderStyle在android中不起作用-react-native

这仍然显示出稳定的borderStyle。经过大量的研究后,我发现在某些情况下使用borderRadius可以显示borderStyle。但是borderStyle的“虚线”和“虚线”对其没有影响。

<TouchableOpacity 
    style = {{ 
    borderStyle: 'dotted',
    borderWidth: 1
   }}
 >
</TouchableOpacity>
Run Code Online (Sandbox Code Playgroud)

react-native

5
推荐指数
3
解决办法
7372
查看次数

“电子邮件格式不正确”反应原生火力

这就是我调用 firebase auth 的方式:

onButtonPress() {
    const {email, password} = this.state;
    console.log(email,password);
    firebase.auth().signInWithEmailAndPassword(email, password)
        .catch( (err) => {
            console.log(err);
              firebase.auth().createUserWithEmailAndPassword(email, password)
                 .catch( (err) => {
                     console.log(err);
                    this.setState({ error: err.message });
             });
        });
   }
Run Code Online (Sandbox Code Playgroud)

这是我的授权文本输入:

<Card>
        <CardSection>
            <Input
                secureTextEntry={false}
                label={'E-mail'}
                placeholder={'user@gmail.com'}
                onChangeText={(email) => this.setState({email})}
                value={this.state.email}
            />
        </CardSection>

        <CardSection>
            <Input
                secureTextEntry={true}
                label={'Password'}
                placeholder={'password'}
                onChangeText={(password) => this.setState({password})}
                value={this.state.password}

            />
        </CardSection>
        <Text style={styles.errorStyle}>{this.state.error}</Text>
        <CardSection>
            <Button onPress={this.onButtonPress.bind(this)}>
                Log In
            </Button>
       </CardSection>
</Card>
Run Code Online (Sandbox Code Playgroud)

但是当它运行时,它会向我显示如下消息:

在此处输入图片说明

即使我没有在输入中输入任何电子邮件和密码并按提交,也会弹出此错误。

firebase react-native

4
推荐指数
1
解决办法
4986
查看次数

反应本机导航抽屉未打开

单击导航栏按钮,抽屉未打开。这是我用于按钮按下的代码

if (event.type === 'NavBarButtonPress') {
        if (event.id === 'sideDrawerToggle') {
            this.props.navigator.toggleDrawer({
                side: 'left',
                animated: true,
            });
        }
    }
Run Code Online (Sandbox Code Playgroud)

这是抽屉设置

Navigation.startTabBasedApp({
        tabs: [
            {
                label: 'Find Place',
                screen: 'places.FindPlace',
                title: 'Find Place', 
                icon: source[0],
                navigatorButtons: {
                    leftButtons: [
                        {
                            icon : source[2],
                            title : 'Menu',
                            id: 'sideDrawerToggle'
                        }
                    ]
                }
            },
            {
                label: 'Share Place', 
                screen: 'places.SharePlace', 
                title: 'Share Place', 
                icon: source[1],
                navigatorButtons: {
                    leftButtons: [
                        {
                            icon: source[2],
                            title: 'Menu',
                            id: 'sideDrawerToggle'
                        }
                    ]
                }
            }
        ],
        drawer: { …
Run Code Online (Sandbox Code Playgroud)

react-native react-native-navigation

4
推荐指数
1
解决办法
3820
查看次数

签署“ appnameTest”需要开发团队。在项目编辑器中选择一个开发团队。(在目标“ appnameTest”中)

当我尝试在Xcode中运行全新安装的React本机项目时,出现此错误。

虽然我已经添加了一个开发者帐户来进行签名。我的Xcode版本是10.0(10A255)

在此处输入图片说明

xcode ios react-native react-native-ios

0
推荐指数
1
解决办法
3276
查看次数