Aurelia和Materialize:$未定义

时间:2017-02-19 21:18:40

标签: aurelia materialize jspm aurelia-framework

我一直在关注this tutorial以包含我在Aurelia项目中的实现。

我做了指南中提到的所有内容:

  • 运行jspm版本0.16.15。
  • jspm install aurelia-materialize-bridge materialize
  • jspm install materialize-css
  • 包含npm版本的覆盖
  • 仅将npm版本导入aurelia app

但是我收到以下错误:

materialize.js:16 Uncaught ReferenceError: $ is not defined
    at materialize.js:16
    at l.U (system.src.js:4597)
    at o.execute (system.src.js:4597)
    at i (system.src.js:4597)
    at s (system.src.js:4597)
    at system.src.js:4597
    at Object.<anonymous> (materialize-css@0.98.0.js:1)
    at materialize-css@0.98.0.js:2
    at l.U (system.src.js:4597)
    at c.execute (system.src.js:4597)
    at i (system.src.js:4597)
    at n (system.src.js:4597)
    at Object.execute (system.src.js:4597)
    at y (system.src.js:4597)
    at w (system.src.js:4597)
    at p (system.src.js:4597)
(anonymous) @ materialize.js:16
U @ system.src.js:4597
o.execute @ system.src.js:4597
i @ system.src.js:4597
s @ system.src.js:4597
(anonymous) @ system.src.js:4597
(anonymous) @ materialize-css@0.98.0.js:1
(anonymous) @ materialize-css@0.98.0.js:2
U @ system.src.js:4597
c.execute @ system.src.js:4597
i @ system.src.js:4597
n @ system.src.js:4597
execute @ system.src.js:4597
y @ system.src.js:4597
w @ system.src.js:4597
p @ system.src.js:4597
h @ system.src.js:4597
(anonymous) @ system.src.js:4597
r @ bluebird.min.js:33
i._settlePromiseFromHandler @ bluebird.min.js:32
i._settlePromise @ bluebird.min.js:32
i._settlePromise0 @ bluebird.min.js:32
i._settlePromises @ bluebird.min.js:32
r._drainQueue @ bluebird.min.js:31
r._drainQueues @ bluebird.min.js:31
drainQueues @ bluebird.min.js:31
system.src.js:4597 Uncaught Uncaught ReferenceError: $ is not defined
    Evaluating http://localhost:9000/jspm_packages/npm/materialize-css@0.98.0/dist/js/materialize.js
U @ system.src.js:4597
o.execute @ system.src.js:4597
i @ system.src.js:4597
s @ system.src.js:4597
(anonymous) @ system.src.js:4597
(anonymous) @ materialize-css@0.98.0.js:1
(anonymous) @ materialize-css@0.98.0.js:2
U @ system.src.js:4597
c.execute @ system.src.js:4597
i @ system.src.js:4597
n @ system.src.js:4597
execute @ system.src.js:4597
y @ system.src.js:4597
w @ system.src.js:4597
p @ system.src.js:4597
h @ system.src.js:4597
(anonymous) @ system.src.js:4597
r @ bluebird.min.js:33
i._settlePromiseFromHandler @ bluebird.min.js:32
i._settlePromise @ bluebird.min.js:32
i._settlePromise0 @ bluebird.min.js:32
i._settlePromises @ bluebird.min.js:32
r._drainQueue @ bluebird.min.js:31
r._drainQueues @ bluebird.min.js:31
drainQueues @ bluebird.min.js:31
bluebird.min.js:31 Unhandled rejection Uncaught Uncaught ReferenceError: $ is not defined
    Evaluating http://localhost:9000/jspm_packages/npm/materialize-css@0.98.0/dist/js/materialize.js
    Evaluating http://localhost:9000/jspm_packages/npm/materialize-css@0.98.0.js
    Error loading http://localhost:9000/jspm_packages/npm/materialize-css@0.98.0.js

这是一个JQuery错误吗?谁能看到我错过的东西?

0 个答案:

没有答案