javascript - 修复导入错误和 TypeError: ActiveDirectory is not a constructor
问题描述
我想在 Vue.js Web 应用程序中使用活动目录,但是一旦安装了模块,我尝试运行我的应用程序会出现几个错误......
安装模块后: npm install activedirectory --save 我确实有一个带有登录名/密码的表单,当我提交时,启动了 activedirectory 模块:
var ActiveDirectory = require("activedirectory");
var config = {
host: "147.156.182.39",
port: "452",
baseDN: "dc=juice,dc=fr",
username: "anfinsol_save@juice.fr",
password: "password123"
};
首次单击时出错:[Vue 警告]:v-on 处理程序中的错误:“TypeError:未知流类型“未定义””
在发现
---> <AthentComponent> at src/components/subcomponents/AuthentComponent.vue
<MainPage> at src/views/Accueil.vue
<App> at src/App.vue
<Root> vue.runtime.esm.js:619
VueJS 7
TypeError: "unknown stream type "undefined""
addStream bunyan.js:620
Logger bunyan.js:470
Logger bunyan.js:469
createLogger bunyan.js:1618
<anonymous> activedirectory.js:16
<anonymous> activedirectory.js:1901
js app.js:925
__webpack_require__ app.js:767
fn app.js:130
<anonymous> index.js:1
js app.js:914
__webpack_require__ app.js:767
fn app.js:130
submit AuthentComponent.vue:52
第二次点击错误:
[Vue warn]: Error in v-on handler: "TypeError: ActiveDirectory is not a constructor"
found in
---> <AthentComponent> at src/components/subcomponents/AuthentComponent.vue
<MainPage> at src/views/Accueil.vue
<App> at src/App.vue
<Root> vue.runtime.esm.js:619
TypeError: "ActiveDirectory is not a constructor"
submit AuthentComponent.vue:57
VueJS 3
正确使用activedirectory没有错误,我已经尝试了几个版本并卸载/安装模块但仍然无法正常工作。
解决方案
推荐阅读
- c# - 如何代表流创建以从 Web Chat 生成用于 Bot 身份验证的访问令牌?
- javascript - 通过数组过滤包含对象数组的对象数组
- javascript - Angularjs指令使HTML元素可拖动并且其中的HTML字段可选择或可修改
- python - 在python中分块下载文件?
- dataframe - 如果一个数据帧依赖于另一个数据帧,火花数据帧执行如何工作?
- git - 如何在 Redmine 中获得修订和 git 问题链接?
- c++ - C++ 类和对象变量在其他地方访问时似乎被覆盖
- web-services - 如何使用 Rave Web 服务从 Medidata Rave 获取实验室数据?
- visual-studio-code - Visual Studio Code - 文件图标颜色
- scala - Gremlin with Neptune:等待可用主机时超时