javascript - 如何在 node.js 中正确导入 strophe.js 插件
问题描述
我现在正在接近strophe.js
node.js。
如何在 node.js 中正确导入插件?
import '../../../lib/strophejs/strophe.disco.js';
let [conn, setConn] = React.useState(new Strophe.Connection("...");
conn.connect("","");
conn.disco.info("");
I get the error: " Cannot read property 'info' of undefined"
- 节点:v14.17.0
- 操作系统:Ubuntu 20.04
解决方案
推荐阅读
- node.js - NodeJS:用于服务器端应用程序的 Google 登录
- java - java.lang.RuntimeException:执行doInBackground()时发生错误Singleton android错误
- java - 从 Apache Camel 中的特定偏移量开始阅读 Kafka 主题
- go - 使用存储结构字段名称和类型的映射来恢复 Go 结构
- google-apps-script - 您如何完成 Google 插件授权生命周期?
- cluster-computing - Slurm:失败的作业将被 --requeue 多少次
- python - 在 python 中只运行一个 for 循环
- java - 来自 MainActivity 的片段中的 bundle 给出的 null
- bulma - 布尔玛级别的课程不会向右
- regex - 如何编写正则表达式以从特定单词中提取前几个字符而不带或不带结束分隔符?