I meet a little mistake with Fluxible@0.4.10:
Warning: Failed Context Types: Required context `getStore` was not specified in `StoreConnector`. Check the render method of `NavIndexItemTheme`.
/client-interface/node_modules/fluxible/addons/connectToStores.js:48
storeInstances[storeName] = this.context.getStore(store);
^
TypeError: undefined is not a function
In fact, I have this:
components
|_NavIndexItemTheme.jsx
...
templates
|_tp1
|_node_modules
| |_react
|_Index.tpl.jsx
In Index.tpl.jsx:
import React from "react";
import NavIndexItemTheme from "../../components/NavIndexItemTheme";
export default function(props) {
return (
<div className="index">
<div className="wrapper flex fdc fas">
<h1>Hello</h1>
<NavIndexItemTheme />
</div>
</div>
);
}
If I delete the node_modules folder to tp1 directory, there isn't mistake. Why this directory causes mistake !!!
You should not keep multiple node_modules
folders inside of one project, this introduces ambiguity to your dependency resolution, which leads to mess. Looks like your Fluxible modules are of different versions than the one used in project root and NavIndexItemTheme
.
templates/tp1/node_modules
Application
) is wrapped in a provideContext()
function from fluxible/addons/
.