So I've just started to try to get to grips with require.js and it doesn't seem to be working. When I include it in my html using the tag:
<script data-main="scripts/main" src="bower_components/require/build/require.js"></script>
I get the following error upon loading the page in chrome
Uncaught TypeError: Cannot read property '__MODULE_PATH__' of undefined -> require.js:538
In firefox I get a slightly different error:
TypeError: parent is undefined -> require.js:538
No idea how I could be causing this problem as It's a fresh install of require.js and I have no code in my main.js yet.
Thanks in advance
Make sure that in dependecies list you put requirejs
, not require
, since that is slightly different project, (created just few days ago): http://bower.io/search/?q=require
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句