首页 > 解决方案 > 如何在 node.js 中正确导入 strophe.js 插件

问题描述

我现在正在接近strophe.jsnode.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"

标签: javascriptnode.jspluginsstrophe.js

解决方案


推荐阅读