Skip to content

Raven throws ReferenceError: window is not defined #707

Description

@yingliangzhang

I'm using raven-js in parse cloud code:

import Raven from 'raven-js';
// Initialize Sentry
Raven.
config(ENV.SENTRY.DSN)
.install();

Got following error on raven-js 3.3.0

ReferenceError: window is not defined

/**
* Enforces a single instance of the Raven client, and the
* main entry point for Raven. If you are a consumer of the
* Raven library, you SHOULD load this file (vs raven.js).
**/
'use strict';
var RavenConstructor = require('./raven');
var _Raven = window.Raven;
var Raven = new RavenConstructor();

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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