【问题标题】:TypeError: Cannot read property 'jsPlumb' of undefinedTypeError:无法读取未定义的属性“jsPlumb”
【发布时间】:2019-08-13 16:51:47
【问题描述】:

我需要帮助,我不能在 angular-gantt 中使用任务之间的依赖关系。我发现了这个错误:

TypeError:无法读取未定义的属性“jsPlumb” 在新的 DependenciesManager (http://localhost:8080/....

HTML 文件代码:

<div class="col-sm-12"
                 gantt data=gantEventsData
                 from-date="ganttOptions.fromDate"
                 to-date="ganttOptions.toDate"
                 view-scale="ganttOptions.scale"
                 headers="ganttOptions.headers"
                 current-date="ganttOptions.currentDate"
                 max-height="ganttOptions.maxHeight"
                 side-width = "ganttOptions.sideWidth"
                 allow-side-resizing="ganttOptions.allowSideResizing" >
                <gantt-dependencies></gantt-dependencies>
                <gantt-tree></gantt-tree>
            </div>

package.json 中的依赖对象

"{
  "_from": "jsplumb@2.3.2",
  "_id": "jsplumb@2.3.2",
  "_inBundle": false,
  "_integrity": "sha1-onPSUrbOhRakECj8mdzGSKKct7g=",
  "_location": "/jsplumb",
  "_phantomChildren": {},
  "_requested": {
    "type": "version",
    "registry": true,
    "raw": "jsplumb@2.3.2",
    "name": "jsplumb",
    "escapedName": "jsplumb",
    "rawSpec": "2.3.2",
    "saveSpec": null,
    "fetchSpec": "2.3.2"
  },
  "_requiredBy": [
    "#USER",
    "/"
  ],
  "bundleDependencies": false,
  "deprecated": false,
  "description": "Visual connectivity for webapps",
  "devDependencies": {
    "biltong": "^0.4.0",
    "grunt": "~0.4.1",
    "grunt-contrib-clean": "~0.5.0",
    "grunt-contrib-concat": "~0.3.0",
    "grunt-contrib-connect": "^0.11.2",
    "grunt-contrib-copy": "~0.4.1",
    "grunt-contrib-jshint": "~0.6.2",
    "grunt-contrib-qunit": "^0.7.0",
    "grunt-contrib-uglify": "~0.2.2",
    "grunt-contrib-watch": "~0.5.3",
    "grunt-contrib-yuidoc": "0.5.2",
    "grunt-exec": "^1.0.1",
    "grunt-jekyll": "~0.4.1",
    "grunt-qunit-junit": "^0.3.1",
    "jsbezier": "^0.9.1",
    "katavorio": "^0.19.2",
    "morgan": "1.8.0",
    "mottle": "^0.8.0"
  },

}

【问题讨论】:

  • 您好,欢迎来到 StackOverflow。不幸的是,您的问题没有包含足够的信息,无法让我们为您提供帮助。考虑添加更多数据,在stackblitz.com 上创建一个小的可重复示例会很棒。请看看这个guide
  • 你安装了 jsPlumb 吗? package.json 的依赖部分有什么?
  • 是的我安装了,我加了一部分代码

标签: angularjs angularjs-directive angularjs-scope jsplumb angular-gantt


【解决方案1】:

库未加载。尝试将&lt;script src="node_modules/jsplumb/dist/js/jsplumb.min.js"&gt;&lt;/script&gt; 放在加载的node_modules 脚本之上

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-11-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-24
    • 2019-08-19
    相关资源
    最近更新 更多