我遇到了Meteor和Jquery的问题。我添加了underscore.js和jquery,但当我尝试运行代码时仍然遇到跟随错误。服务器在启动之前失败。流星与jQuery碰撞
任何帮助,将不胜感激。
这里是输出窗口的副本。我知道我错过了一些非常简单的事情。我可以让其他流星应用程序运行。
=> Meteor server running on: localhost:3000/
.meteor\local\build\server\server.js:34
5
}).run();
^
ReferenceError: jQuery is not defined
at app/lib/jquery-ui.custom.min.js:4:4148
at \.meteor\local\build\server\serve
r.js:306:12
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\rodgerse\node_modules\underscore\unde
rscore.js:79:11)
at run (\.meteor\local\build\server\
server.js:239:7)
=> Exited with code: 1
=> Meteor server restarted
\.meteor\local\build\server\server.js:34
5
}).run();
^
ReferenceError: jQuery is not defined
at app/lib/jquery-ui.custom.min.js:4:4148
at \.meteor\local\build\server\serve
r.js:306:12
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\rodgerse\node_modules\underscore\unde
rscore.js:79:11)
at run (\.meteor\local\build\server\
server.js:239:7)
=> Exited with code: 1
=> Meteor server restarted
\.meteor\local\build\server\server.js:34
5
}).run();
^
ReferenceError: jQuery is not defined
at app/lib/jquery-ui.custom.min.js:4:4148
at \.meteor\local\build\server\serve
r.js:306:12
at Array.forEach (native)
at Function._.each._.forEach (C:\Users\rodgerse\node_modules\underscore\unde
rscore.js:79:11)
at run (\.meteor\local\build\server\
server.js:239:7)
=> Exited with code: 1
=> Your application is crashing. Waiting for file change.
你确定'jQuery'可用吗?看来,jQuery UI无法访问jQuery。 – josh
“我添加了underscore.js和jquery” - 默认情况下,Meteor包含jQuery和Underscore,因为Meteor的核心使用了它们两个。你不需要做任何事情来添加它们。请注意,您只能在客户端代码中使用jQuery,但您可以在客户端和服务器代码上使用Underscore。 – sbking