Skip to content
This repository has been archived by the owner on Jan 2, 2018. It is now read-only.

Better handling of non existing reducers-file #25

Closed
Naycon opened this issue Aug 19, 2016 · 2 comments
Closed

Better handling of non existing reducers-file #25

Naycon opened this issue Aug 19, 2016 · 2 comments

Comments

@Naycon
Copy link

Naycon commented Aug 19, 2016

If one accidentally specifies a path for the reducers setting that doesn't exist, e.g:

build: {
      reducers: 'src/i/dont/exist.js',
      routes: 'src/routes/index.js',
}

...the resulting error message is confusing and doesn't help very much in letting you know what is wrong:

roc:react-render Fetching error +247ms   Error: Invariant Violation: Could not find "store" in either the context or props of "Connect(AddTodoImpl)". Either wrap the root component in a <Provider>  , or explicitly pass "store" as a prop to "Connect(AddTodoImpl)".

It would be great if this package (or Roc) could instead point out that file couldn't be found at all.

@dlmr
Copy link
Member

dlmr commented Nov 14, 2016

The thing to think about when implementing this is to only warn when a custom path has been provided, since we want it to fail silently when the default path can't be resolved.

@dlmr
Copy link
Member

dlmr commented Jan 2, 2018

This issue has been moved into the mono repository rocjs/extensions#20.

@dlmr dlmr closed this as completed Jan 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants