Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Module won't load because window.require is unavailable #11

@eltonjude

Description

@eltonjude

Due to a know issue with Electron (look for "jQuery/RequireJS/Meteor/AngularJS" here http://electron.atom.io/docs/faq/) the recommendation on Electron FAQ is to rename window.require to something else. However, because of this, angular-electron module won't load throwing error:

Error: [$injector:modulerr] Failed to instantiate module angular-electron due to:
TypeError: electronRequire is not a function

If you could make an assumption that the require was renamed to nodeRequire and changed this line: https://github.com/ozsay/angular-electron/blob/master/angular-electron.js#L109 to

(window.angular, window.require || window.nodeRequire, window.process);

things should work out fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions