最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - require.js uncaught typeerror: cannot read property '__module_path__; of undefined - Stack Overflow

programmeradmin1浏览0评论

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

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

Share Improve this question asked Sep 17, 2014 at 14:32 Circuit 8Circuit 8 4796 silver badges20 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 24

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

发布评论

评论列表(0)

  1. 暂无评论