电子无法读取属性 getName of undefined
Electron cannot read property getName of undefined
我在 http://electron.atom.io/docs/v0.36.5/api/menu/遵循电子菜单示例,但是我收到错误
Cannot read property 'getName' of undefined
这发生在调用require('electron').app.getName();
的位置。
当我打开开发工具并查看时,我看到require('electron')
似乎加载正确,但require('electron').app
返回未定义。
我将假设您在主进程中执行此操作,如果是这样,您可能需要检查是否在某处安装了另一个electron
模块,如常见问题解答中所述:https://github.com/atom/electron/blob/v0.36.6/docs/faq/electron-faq.md#requireelectronxxx-is-undefined
相关文章:
- HighChart : Usage of setData
- Difference between methods of defining JavaScript 'class
- 为什么我在下面的..of循环中得到意外令牌
- Appending the innerhtml of <th>
- Animation cuts off multiple lines of text in <p>
- javascript: functionname() instread of functionname()
- jQuery使用.of()删除事件处理程序时出现的问题
- Three.js issue creating meshes outside of loader's load(
- jquery in the middle of html
- JavaScript equivalent of C#'s DynamicObject?
- nodejs console.log of object
- value of jquery sortable
- Javascript imageData returns array of 0's
- 对于grunt构建中的(let.of)错误
- Opposite of jQuery's :eq()
- Implementation of jQuery 'animate' with Meteor
- 当调用.of()然后调用.on()时,Jquery是否可能将事件推迟
- Angularjs ng-options selected value of dropdownlist
- Java eqivalent method of “splice(a,b,..)“在 JavaScript 方法中
- 电子无法读取属性 getName of undefined