question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

extends is not defined

See original GitHub issue

When I am using ng2-smart-table, this error occurred.

I don’t konw why the build out files not contains extend’s definition.

I installed by npm, --version 0.2.3

image

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
Tadworkcommented, Sep 20, 2016

related to #16 I am pretty sure that this is because the component is compiled with

    "noEmitHelpers": true,

in the tsconfig

a temporary fix would be to add

  <script>
    var __extends = (this && this.__extends) || function (d, b) {
        for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
    var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    var __metadata = (this && this.__metadata) || function (k, v) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
    };
    var __param = (this && this.__param) || function (paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); }
    };
    var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
        return new (P || (P = Promise))(function (resolve, reject) {
            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
            function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }
            function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments)).next());
        });
    };
    </script>

as a global script until a new version is pushed to npm

0reactions
nnixaacommented, Oct 27, 2016

fixed in 0.4.0-3

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] Uncaught ReferenceError: __extends is not defined
I have a react app which is created with create-react-app. ... The problem exists only when app is build for production. It's working...
Read more >
ReferenceError: extend is not defined - Stack Overflow
You've tagged jquery so I'm presuming your using jquery. extend isn't a built in method to javascript but JQuery has a method called...
Read more >
extends - JavaScript - MDN Web Docs - Mozilla
The extends keyword is used in class declarations or class expressions to create a class that is a child of another class.
Read more >
[BUG] Uncaught ReferenceError: __extends is not defined
Description/Screenshot I have a react app which is created with create-react-app. When I create production build of my app and serve it I'm ......
Read more >
ReferenceError: exports is not defined in TypeScript | bobbyhadz
If you run your code in the browser, try removing the module property from your tsconfig.json file and set target to es6 ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found