8000 init is not a function · Issue #1204 · feathersjs/feathers · GitHub
[go: up one dir, main page]

Skip to content

init is not a function #1204

@dottodot

Description

@dottodot

Not sure if this a bug or not as can't reproduce but trying to understand why it would happen as it's an error that seems to crop up reasonably regularly.

The error I get is

Uncaught (in promise): TypeError: t.init is not a function
TypeError: t.init is not a function

My angular service is as below

export class ApiService {
  private feathers: any;
  constructor(
    private http: HttpClient,
  ) {
    this.feathers = feathers(); // Error occurs here
    const restClient: Transport = rest(environment.host);

    this.feathers
      .configure(
        restClient.angularHttpClient(this.http, { HttpHeaders: HttpHeaders })
      ));
  }
}

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

      0