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.

__WEBPACK_IMPORTED_MODULE_ xxxxx is not a function

See original GitHub issue

(Was originally opened here: https://github.com/angular/angular/issues/15866)

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior Webpack (or Typescript) seems to strip static methods on inheritance. I’m posting here because the problem manifests in the context of Angular.

We’re using angularfire2, and more specifically FirebaseListObservable.

FirebaseListObservable extends Observable, so FirebaseListObservable should have the static function of.

However, when I do ng serve I get the following error:

__WEBPACK_IMPORTED_MODULE_1_angularfire2__.a.of is not a function
    at AppComponent.webpackJsonp.132.AppComponent.ngOnInit

Expected behavior Looking through angularfire2’s code for FirebaseListObservable, they extend Observable like expected, and thus of should be available. So I’m not thinking it’s their problem?

Minimal reproduction of the problem with instructions

ng new bug
npm install angularfire2 --save
npm install firebase --save
npm install rxjs --save

app.component.ts:

import { Component, OnInit } from '@angular/core';

import { FirebaseListObservable } from 'angularfire2';
import { Observable } from 'rxjs';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
  title = 'app works!';

  ngOnInit() {
    FirebaseListObservable.of({}).subscribe();
  }
}

ng serve --open

Please tell us about your environment:

  • Angular version: 4.0.1

  • Browser: [all]

  • Language: TypeScript 2.2.2

  • Node (for AoT issues): node --version = 7.8.0

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
clydincommented, Apr 11, 2017

You need to import any operators that will be used. For of:

import 'rxjs/add/observable/of';
0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

WEBPACK_IMPORTED_MODUL...
But i am finding this error in Firebase connection. Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_0__firebase__.a.initialize is not a function.
Read more >
firebase__WEBPACK_IMPORTE...
TypeError : Webpack imported module is not a function · Importing React as default module not working inside Symfony Webpack Encore project ·...
Read more >
类不是构造函数, 类型错误:不是构造函数, TypeError 不是构造 ...
有时我会得到以下信息: TypeError: h is not a constructor dropdown.js:177:23 它包含在内,它想要什么?系统。register ([], function (exports_1, ...
Read more >
Webpack 5 release (2020-10-10)
MIGRATION: Make sure that your webpack 4 build does not print deprecation warnings. ... defineProperty(exports|this|module.exports, "xxx", .
Read more >
Lv belt yupoo - ROHRBOT
Before opening the pictures search function, the search system needs to synchronize all the pictures in the history of the album, and it...
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