Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

In combination with MUI and rematch I am getting: Module not found: Can't resolve 'react-block-ui/reduxMiddleware' in #52

Open
josoroma-zz opened this issue Feb 29, 2020 · 3 comments

Comments

@josoroma-zz
Copy link

josoroma-zz commented Feb 29, 2020

store.js

import { init } from '@rematch/core';
import createPersistPlugin from '@rematch/persist';
import { routerMiddleware, connectRouter } from 'connected-react-router';
import { createBrowserHistory } from 'history';

import reduxMiddleware from 'react-block-ui/reduxMiddleware'; // only for redux

import * as models from 'models';

export const history = createBrowserHistory();

const persistPlugin = createPersistPlugin({
  blacklist: [
    'persist',
  ],
  whitelist: [
    'user',
    ...
  ],
});

export default init({
  models,
  plugins: [persistPlugin],
  redux: {
    reducers: {
      router: connectRouter(history),
    },
    middlewares: [
      reduxMiddleware,
      routerMiddleware(history),
    ],
  },
});

Error

image

Double checking package installation

image

@josoroma-zz josoroma-zz changed the title In combination with rematch I am getting: Module not found: Can't resolve 'react-block-ui/reduxMiddleware' in In combination with MUI and rematch I am getting: Module not found: Can't resolve 'react-block-ui/reduxMiddleware' in Feb 29, 2020
@TheSharpieOne
Copy link
Collaborator

try import reduxMiddleware from 'react-block-ui/lib/reduxMiddleware';

@jaco9419
Copy link

try import reduxMiddleware from 'react-block-ui/lib/reduxMiddleware';

Thank you! I was running with a similar issue and this helped me.

@Rezaraki
Copy link

Rezaraki commented Feb 7, 2023

try import reduxMiddleware from 'react-block-ui/lib/reduxMiddleware';

then it would error this:

Could not find a declaration file for module 'react-block-ui/lib/redux'. '.../node_modules/react-block-ui/lib/redux.js' implicitly has an 'any' type.
If the 'react-block-ui' package actually exposes this module, try adding a new declaration (.d.ts) file containing declare module 'react-block-ui/lib/redux';

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants