【发布时间】:2019-02-14 14:51:16
【问题描述】:
我使用了以下包 从“react-native-mssql”导入 MSSQL;
悬停在上述包裹附近,它显示
找不到模块“react-native-mssql”的声明文件。 'd:/React Native Apps/Login/node_modules/react-native-mssql/index.android.js' 隐含了一个 'any' 类型。
尝试npm install @types/react-native-mssql(如果存在)或添加包含declare module 'react-native-mssql'; 的新声明(.d.ts)文件
模块“d:/React Native Apps/Login/node_modules/react-native-mssql/index.android
我已尝试按上述方式安装,但没有任何效果。
在代码中,我在下面的行中遇到错误。 MSSQL.connect(config);
错误如下 undeined 不是对象(评估 '_reactNativeMssql2.default.connect')
请告诉我如何使用 react-native 连接到 MSSQL。
【问题讨论】:
-
你有最新版本的 react-native 吗?因为似乎是一个 react-native 源代码错误。
标签: sql-server typescript react-native