我已成功加载 jQuery(设置时require.config
)...
// For details see:
// http://groups.google.com/group/requirejs/browse_thread/thread/e7532b7e3013bc62/1e5ca8a89b276de6?show_docid=1e5ca8a89b276de6
require.config({
paths : {
'jquery' : 'Utils/jquery'
}
});
我在这里有一个完整设置的 github 存储库:https ://github.com/Integralist/RequireJs-Example
我的问题是,当我尝试运行构建脚本时:https://github.com/Integralist/RequireJs-Example/blob/master/Assets/Scripts/app.build.js它在定位 jQuery 时窒息,并给出以下信息错误...
Error: Error: Error evaluating module "undefined" at location "/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/project-build/Assets/Scripts/jquery.js":
Error: EBADF, Bad file descriptor '/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/project-build/Assets/Scripts/jquery.js'
fileName:/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/project-build/Assets/Scripts/jquery.js
lineNumber: undefined
http://requirejs.org/docs/errors.html#defineerror
In module tree:
main
App/people
at Function.onError (/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/Assets/Scripts/r.js:7341:23)
at execManager (/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/Assets/Scripts/r.js:592:28)
at /Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/Assets/Scripts/r.js:620:25
at execManager (/Users/stormcreative/Dropbox/Library/JavaScript/Libraries/RequireJs/Assets/Scripts/r.js:597:17)
...关于如何解决这个问题的任何想法?它似乎试图在主/Assets/Scripts/
文件夹中找到 jQuery,但它实际上在/Assets/Scripts/Utils/jquery.js
期待您的帮助。
亲切的问候,马克