Skip to content

TypeError: (void 0) is not a function #84

Closed
@michaelsw95

Description

@michaelsw95

When including the Exceptionless client library within my Angular 7 Application, I get a type error on bootstrap when I do a production build (non production builds work fine).

The error is thrown within my app module where I do:

import { ExceptionlessClient } from 'exceptionless';

The actual error appears to happen on line 1280
"webpack:///./node_modules/exceptionless/dist/exceptionless.js.pre-build-optimizer.js".

Here require appears to be throwing the error.

var exports, require;

Removing the exceptionless client library from my application appears to fix the issue but I am not entirely convinced that this is a exceptionless issue.

Has anyone experienced this? Currently I am unable to serve production builds and have exceptionless logging. I have tried modify (updating/downgrading) all angular dependencies but this did not resolve the issue.

Here is my package json, I am using the latest version of the exceptionless client library:

"dependencies": {
    "@angular/animations": "7.2.0",
    "@angular/common": "7.2.0",
    "@angular/compiler": "7.2.0",
    "@angular/core": "7.2.0",
    "@angular/forms": "7.2.0",
    "@angular/http": "7.2.0",
    "@angular/platform-browser": "7.2.0",
    "@angular/platform-browser-dynamic": "7.2.0",
    "@angular/router": "7.2.0",
    "bootstrap": "4.2.1",
    "core-js": "2.6.2",
    "exceptionless": "1.6.0",
    "node-sass": "4.11.0",
    "oidc-client": "1.6.1",
    "rxjs": "6.3.3",
    "zone.js": "0.8.26"
},
"devDependencies": {
    "@angular-devkit/build-angular": "0.12.1",
    "@angular/cli": "7.2.1",
    "@angular/compiler-cli": "7.2.0",
    "@angular/language-service": "7.2.0",
    "@types/node": "10.12.18",
    "@types/jasmine": "3.3.5",
    "@types/jasminewd2": "2.0.6",
    "codelyzer": "4.5.0",
    "jasmine-core": "3.3.0",
    "jasmine-spec-reporter": "4.2.1",
    "karma": "3.1.4",
    "karma-chrome-launcher": "2.2.0",
    "karma-coverage-istanbul-reporter": "2.0.4",
    "karma-jasmine": "2.0.1",
    "karma-jasmine-html-reporter": "1.4.0",
    "protractor": "5.4.2",
    "ts-node": "7.0.1",
   "tslint": "5.12.0",
   "typescript": "3.1.1"
 }

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