Skip to content
This repository has been archived by the owner on Apr 8, 2021. It is now read-only.

Uncaught ReferenceError: _ is not defined #7

Closed
bondarewicz opened this issue Feb 11, 2014 · 2 comments
Closed

Uncaught ReferenceError: _ is not defined #7

bondarewicz opened this issue Feb 11, 2014 · 2 comments

Comments

@bondarewicz
Copy link

After changing cloud/views/index.ejs file to use non minified shop.js

<script src="/assets/js/shop.min.js?1377809478"></script>
to 
<script src="/assets/js/shop.js"></script>

Getting Uncaught ReferenceError on below line

var itemTemplate = _.template($('#item-template').html());

in here

@jonasschneider
Copy link

shop.min.js is not the minified version of shop.js, but a compilation of a set of files that includes shop.js -- have a look at the definition here: https://github.com/stripe/shop/blob/master/Gruntfile.js#L13

If you only include shop.js, the other files won't be included. You either have to recompile shop.min.js using Grunt, or include all the other files mentioned in the Gruntfile in addition to shop.js.

@bondarewicz
Copy link
Author

@jonasschneider 👍 thanks very helpful, closing

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants