当我尝试在角度cli中创建一个组件时,它向我显示了这个错误.我怎么摆脱它?
错误:多个模块匹配.使用skip-import选项跳过将组件导入最近的模块.
我正在使用angular cli版本:1.4.1
我在我的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,则应用程序运行时不会出现任何错误.
在我的项目中集成哨兵后,开发环境工作正常,但是当我尝试构建项目时,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
pm2 后面的所有 8 个节点上的 CPU 使用率很容易飙升。它在新启动时表现良好,但随着时间的推移,它似乎会显着退化。内存占用很好,通常最高在 300MB 左右。
这仍然显示出稳定的borderStyle。经过大量的研究后,我发现在某些情况下使用borderRadius可以显示borderStyle。但是borderStyle的“虚线”和“虚线”对其没有影响。
<TouchableOpacity
style = {{
borderStyle: 'dotted',
borderWidth: 1
}}
>
</TouchableOpacity>
Run Code Online (Sandbox Code Playgroud) 这就是我调用 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)
但是当它运行时,它会向我显示如下消息:
即使我没有在输入中输入任何电子邮件和密码并按提交,也会弹出此错误。
单击导航栏按钮,抽屉未打开。这是我用于按钮按下的代码
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)