josx / ra-data-feathers

A feathers rest client for react-admin
MIT License
157 stars 53 forks source link

Uncaught Error: injectTapEventPlugin(): Can only be called once per application lifecycle #9

Closed AmrN closed 7 years ago

AmrN commented 7 years ago

Getting this error when using with AOR version 1.0.1 I think the dependencies package version needs to be updated.

josx commented 7 years ago

Right now We have tested with AOR 0.9.x Please try to upgrade dependecies or change code and make a PR.

AmrN commented 7 years ago

Tried updating AOR version, it works well and that error doesn't appear anymore. I sent a PR.

wedneyyuri commented 7 years ago

Hi @josx, can we reopen this issue? This issue was masked by #10 because after the update we will have only 1 version of admin-on-rest in node_modules folder (see https://docs.npmjs.com/how-npm-works/npm3).

We can require only one version of admin-on-rest/lib/mui/layout (which is being required by admin-on-rest), so the solution is apply the changes bellow in src/restClient.js (see https://github.com/tomberek/aor-postgrest-client/blob/1b965262487ed0e392575ef2c1b937ce181f0298/src/index.js#L10):

from

import {
  GET_MANY,
  GET_MANY_REFERENCE,
  GET_LIST,
  GET_ONE,
  CREATE,
  UPDATE,
  DELETE,
} from 'admin-on-rest';

to

import {
  GET_MANY,
  GET_MANY_REFERENCE,
  GET_LIST,
  GET_ONE,
  CREATE,
  UPDATE,
  DELETE,
} from 'admin-on-rest/lib/rest/types';
josx commented 7 years ago

thanks a lot!