简体   繁体   English

require.js uncaught typeerror:无法读取属性'__module_path__; 未定义的

[英]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 ,因为这是一个稍微不同的项目,(几天前创建): httprequirejs

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Require.js Uncaught TypeError:undefined不是函数 - Require.js Uncaught TypeError: undefined is not a function 无法读取未定义的属性“原型”; 使用Require.js继承CoffeeScript - Cannot read property 'prototype' of undefined; CoffeeScript inheritance with Require.js 未捕获的类型错误:无法读取 __webpack_require__ 处未定义的属性“调用” - Uncaught TypeError: Cannot read property 'call' of undefined at __webpack_require__ 未捕获的TypeError:使用require.js时undefined不是函数 - Uncaught TypeError: undefined is not a function when using require.js require.js未捕获的TypeError:对象的属性&#39;$&#39; <Object> 不是一个功能 - require.js Uncaught TypeError: Property '$' of object #<Object> is not a function Chaplin.js-未捕获的TypeError:无法读取未定义的属性“未定义” - Chaplin.js - Uncaught TypeError: Cannot read property 'undefined' of undefined 未捕获的类型错误:无法读取未定义的属性“路径” - React - Uncaught TypeError: Cannot read property 'path' of undefined - React HghCharts追溯模块:未捕获的TypeError:无法读取未定义的属性&#39;lang&#39; - HghCharts drilldown module: Uncaught TypeError: Cannot read property 'lang' of undefined AngularJS + TypeScript:未捕获的TypeError:无法读取未定义的属性“模块” - AngularJS + TypeScript: Uncaught TypeError: Cannot read property 'module' of undefined 未捕获的类型错误:从 js 模块导入存储时无法读取未定义的属性“getters” - Uncaught TypeError: Cannot read property 'getters' of undefined when importing store from js module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM