1

代码工作得很好,但是当 Charles 代理在后台运行时,我在 Chrome 和 Firefox 中出现以下错误。Charles 代理在默认设置下运行。

未捕获的错误:模块的加载超时:jQuery,handlebars http://requirejs.org/docs/errors.html#timeout require.js:8
F require.js:8
C require.js:13
(匿名函数)

OS: OS X 10.8.4
Charles: v 3.7 
Chrome : 28.0.1500.71
Firefox : 22.0 
4

1 回答 1

0

原来问题与主机文件有关。Requirejs 抛出超时,因为 localhost 需要很长时间才能解决。将主机文件更新为此后一切正常:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.
##
127.0.0.1 localhost.localdomain  
127.0.0.1 localhost 
127.0.0.1 username.lmuk.local
255.255.255.255  broadcasthost
::1              localhost 
fe80::1%lo0      localhost

更多信息可在此处获得。

于 2013-09-16T14:30:48.863 回答