[英]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. 所以我刚刚开始尝试使用require.js并且它似乎没有工作。 When I include it in my html using the tag:
当我使用标签将其包含在我的html中时:
<script data-main="scripts/main" src="bower_components/require/build/require.js"></script>
I get the following error upon loading the page in chrome 在chrome中加载页面时出现以下错误
Uncaught TypeError: Cannot read property '__MODULE_PATH__' of undefined -> require.js:538
In firefox I get a slightly different error: 在Firefox中我得到一个稍微不同的错误:
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. 不知道我是如何导致这个问题的,因为它是一个全新的require.js安装,我的main.js中还没有代码。
Thanks in advance 提前致谢
确保在dependecies列表中你放置requirejs
,而不是require
,因为这是一个稍微不同的项目,(几天前创建): http : requirejs
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.