Skip to content

Ionic 2 (Angular2) and raven-js (undefined is not an object (evaluating 'raven_js_1.default.config')) #643

Closed
@galuszkak

Description

@galuszkak

Hello, thanks for hard work on Sentry :).

Problem that I encounter is maybe related to our build configuration. We are using Ionic 2 which uses Browserify to build app.

import Raven from 'raven-js';

Raven.config('https://e13394886dfc405c9cad08fcf5e53cf9@app.getsentry.com/86010').install();

This code to transpiles to:

var raven_js_1 = require('raven-js');
raven_js_1.default.config('https://e13394886dfc405c9cad08fcf5e53cf9@app.getsentry.com/86010').install();

This produces error:

TypeError: undefined is not an object (evaluating 'raven_js_1.default.config')
(anonymous function) — app.ts:16
s — _prelude.js:1
e — _prelude.js:1
global code — _prelude.js:1

Browser is Safari/UIWebView (I believe this is used by Apache Cordova on iOS). For now because of that we can't use Sentry on our app.

Thanks for any help.

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