Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rekit-plugin-redux-saga not installing properly #99

Open
cellerich opened this issue Mar 4, 2018 · 7 comments
Open

rekit-plugin-redux-saga not installing properly #99

cellerich opened this issue Mar 4, 2018 · 7 comments
Labels

Comments

@cellerich
Copy link

As mentioned already in the Gitter Channel I thought I file an issue as well.

Steps to reproduce:

npm install -g rekit@latest
rekit create cf03
cd cf03
npm install rekit-core@latest rekit-studio@latest redux-saga
rekit install rekit-plugin-redux-saga
npm install
npm start

Everything compiles and start the 3 servers. When I try to add a new Feature in Rekit Studio i get the following error:
image
If I look at the source files there is also no "rootSaga.js" and no Saga Middleware injected in the Apps index.js

image

Either I do something terrible wrong or there might be a bug in the plugin-code.

Thanks for the great work on Rekit, which helps a beginner in React and Redux stuff to grasp concepts and insights around this cool stuff.

@supnate
Copy link
Owner

supnate commented Mar 4, 2018

Hi @cellerich , you need to run "npm install" before install the plugin, the correct order is:

npm install
rekit install redux-saga

You don't need to install "rekit-studio" and "rekit-core" separately, they will be installed when run "npm install".

@cellerich
Copy link
Author

Thanks @supnate. Will try this out immediately :-)

@cellerich
Copy link
Author

Sorry to bother again. Maybe I'm asking "noob" questions:
I tried the following in exact order:

rekit create cf01
cd cf01
npm install
rekit install rekit-plugin-redux-saga
npm start

If I open Rekit Studio and try to add new feature I get the same error as mentioned above in picture 1.
I have globally installed react-saga and im using the following versions:

node --version
v9.5.0
npm --version
5.6.0

rekit-plugin-redux-saga is installed in the node_modules folder. But still no rootSaga.js in /src/common.

I'm running the terminal as Admin, so there should be no issues writing files. Here is the output after the rekit install rekit-plugin-redux-saga command:

rekit install rekit-plugin-redux-saga
Installing plugin:  rekit-plugin-redux-saga
Writing to package.json...
Executing install.js if exists...
Done.: 30012.496ms

@supnate
Copy link
Owner

supnate commented Mar 4, 2018

Hi @cellerich , could you try adding an async-action in an existing feature first? It seems there's bug when creating a feature the rootSaga.js is not auto initialized.

@cellerich
Copy link
Author

Hi @supnate
This did the trick!
After adding another async action to a existing feature the needed adjustments to the necessary files where made. After this I can also create a new feature without errors.

Thanks so much, no I can continue to explore the "rekit-world"!

@supnate
Copy link
Owner

supnate commented Mar 4, 2018

That's great! Thanks for the patience! It's really a bug should be fixed.

@supnate supnate added the bug label Mar 4, 2018
@dzegarra
Copy link

I'm using Rekit in my current project with redux-saga and rekit-redux-saga plugin. I noticed immediately that something was not working properly and I decided to fixed myself.

I believe that the rekit-redux-saga library was not updated (yet) to be compatible with the last version of redux-saga.

Here are the changes I did to make it work again

# src/common/rootSaga.js
import { all } from "redux-saga/effects";
...
function* rootSaga() {
  yield all(sagas.map(/* istanbul ignore next */ saga => saga())); // The all function was not before in this line
}

The redux-saga templates will still import the "delay" function that is not available anymore. Just remove that import. It's used only for demonstration purposes anyway.

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

No branches or pull requests

3 participants