Skip to content

Raven throws "module is not defined" #287

Closed
@vitalybe

Description

@vitalybe

Occurs in master branch, 5390681 due to the code from PR #261:

} else if (isObject(module)) {
    // browserify
    module.exports = Raven;
} else if (isObject(exports)) {
    // CommonJS
    exports = Raven;
} 

To fix, it should be replaced with:

} else if (isObject(window.module)) {
    // browserify
    module.exports = Raven;
} else if (isObject(window.exports)) {
    // CommonJS
    exports = Raven;
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions