prismicio / javascript-jquery-starter

Starter project for JavaScript & JQuery – Works with any prismic.io repository
http://developers.prismic.io
17 stars 29 forks source link

Uncaught ReferenceError: _ is not defined #12

Closed giacecco closed 10 years ago

giacecco commented 10 years ago

Loading the starter occasionally fails with an "Uncaught ReferenceError: _ is not defined " error, using Chrome 34.0.1847.137 on MacOS 10.9.2 and the simple server.sh server you provide, running locally.

Gut feeling is that the RequireJS fails loading the vendor libraries efficiently before the prismic.io code, hence causing a call to Underscore to fail. There must be some trick you can use to avoid this from happening.

Thanks,

G.

Uncaught ReferenceError: _ is not defined templates.js:11
(anonymous function) templates.js:11
i.execCb require-2.1.8.min.js:29
X.check require-2.1.8.min.js:18
(anonymous function) require-2.1.8.min.js:23
(anonymous function) require-2.1.8.min.js:8
(anonymous function) require-2.1.8.min.js:23
y require-2.1.8.min.js:7
X.emit require-2.1.8.min.js:23
X.check require-2.1.8.min.js:19
X.enable require-2.1.8.min.js:23
X.init require-2.1.8.min.js:17
(anonymous function) require-2.1.8.min.js:20
(anonymous function) require-2.1.8.min.js:8
(anonymous function) require-2.1.8.min.js:23
y require-2.1.8.min.js:7
X.emit require-2.1.8.min.js:23
X.check require-2.1.8.min.js:19
X.enable require-2.1.8.min.js:23
X.init require-2.1.8.min.js:17
(anonymous function) require-2.1.8.min.js:21
(anonymous function) require-2.1.8.min.js:8
g.finishLoad text-0.27.0.min.js:10
(anonymous function) text-0.27.0.min.js:10
c.onreadystatechange text-0.27.0.min.js:7
rudyrigot commented 10 years ago

Hey, I saw you opened and close this, and I was interested to know why; is the bug not a bug in the end?

giacecco commented 10 years ago

Sorry I did not explain, I closed it because I wrote it in the wrong prismic GitHub repository. The starter kit with the issue is the backbone one. I've opened the issue there, now.

G.