Sprockets::CircularDependencyError application.js has already been required

断了今生、忘了曾经 提交于 2019-12-10 02:08:27

问题


In my application, I receive a Sprockets::CircularDependencyError application.js has already been required. This affects every page in my application because none of the JS loads. Note - this error occurred after a fairly complex merge.

My assumption (please correct me if I'm wrong) is that this error occurs because two different files require application.js. If so, in which files should I look to debug this error? How could I test my application to determine what files are already requiring application.js?

Thank you very much for any help. I'd be more than happy to supply any pertinent information.


回答1:


"this error occurred after a fairly complex merge. "

I'm sure the conflict would surely be in the application.js file too.. After the merge you might not have removed the extra application.js.* file your version control creates for you, where both of them would be having line of require tree or something.. i.e. both requiring each other thus circular dependency. Make sure there is no such extra file in that folder...



来源:https://stackoverflow.com/questions/11351041/sprocketscirculardependencyerror-application-js-has-already-been-required

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!