Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

require.js uncaught typeerror: cannot read property '__module_path__; of undefined

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

like image 540
Circuit 8 Avatar asked Sep 17 '14 14:09

Circuit 8


1 Answers

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

like image 66
IProblemFactory Avatar answered Oct 15 '22 21:10

IProblemFactory