node.js - 如何在 react-native 中安装 wsdl 连接
问题描述
我正在尝试建立aa wsdl 连接。我收到以下错误。有人可以帮忙吗?
我的连接代码
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
var soap = require('soap');
var url = 'https://localhost:44379/service/ozelekranservice.svc?wsdl';
var args = {User : '15460036927', Password : '123'};
type Props = {};
export default class App extends Component<Props> {
render() {
soap.createClientAsync(url).then((client) => {
console.warn(client.Login(args));
return client.Login(args);
}).then((result) => {
console.warn(result);
});
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome to React Native!</Text>
</View>
);
}
}
错误代码网址:http ://10.0.3.2:8081/index.delta?platform=andoid&dev=true&minify=false body:{"orginModulePath":"
C:\users\...\node_modules\soap\lib\client.js","targetModuleName":"assert","message":"Unable to resolve module'assert'from
'C:\users\...\node_modules\soap\lib\client.js':Module 'assert' does not exist in the Haste module map\n\n这可能与https://github.com/facebook有关/react-native/issues/4968 \n要解决,请尝试以下操作:\n
清除守望者手表:'watchman watch-del-all'。\n
删除“node_modules”文件夹:“rm -rf node_modules &&nom install”。\n
3.重置 Metro Bundler 缓存:'rm -rf/tmp/metro-bundler-chace-*' 或 'npm start -- --reset-chace'。\n
- 删除急速:'rm -rf /tmp/haste-mat-react-native-packager-*'.","errors":[{"description":"Unable to resolve module 'assert'from
'C:\users\...\node_modules\soap\lib\client.js': 模块 'assert' 在 Haste 模块映射中不存在\n\n这可能与
解决方案
推荐阅读
- python - Pylint 检查器:未对字符串调用格式函数
- javascript - Ag-Grid Master-Details 数据更新问题
- mongodb - MongoDB比较两个字段并在所有文档中对另一个字段求和
- python - 从 sklearn 导入 LogisticRegression 时出现导入错误
- python - 在python中消除相位并比较数组
- angular - 我可以在 IE 11 中调试 Typescript 服务文件吗?
- javascript - 覆盖 div 没有出现在我的主 div 之上
- r - RVest 有时有效,有时返回 0 个节点
- spring-boot - java.lang.IllegalArgumentException:索引 7 处的权限中的非法字符
- javascript - 如何以最少的麻烦最好地管理项目上的 JavaScript 依赖项