johnkorzhuk/fast-poll

production build error on "Building static HTML for pages"

Opened this issue · 0 comments

I'm able to use Promises or Async/Await during development. However, If I use Async/Await anywhere in the ./src/ directory, I get an Invariant Violation error on the Building static HTML for pages production build step:

  40 |       var args = [a, b, c, d, e, f];
  41 |       var argIndex = 0;
> 42 |       error = new Error(
     | ^
  43 |         format.replace(/%s/g, function() { return args[argIndex++]; })
  44 |       );
  45 |       error.name = 'Invariant Violation';

The stack trace:

  WebpackError: Could not find "store" in either the context or props of "Connect(Auth)". Either wrap the root component in a <Provider>, or explicitly pass "store" as a prop to "Connect(Auth)".

  - invariant.js:42 invariant
    ~/invariant/invariant.js:42:1

  - connectAdvanced.js:134 new Connect
    ~/react-redux/lib/components/connectAdvanced.js:134:1

  - ReactCompositeComponent.js:295 ReactCompositeComponentWrapper._constructComponentWithoutOwner
    ~/react-dom/lib/ReactCompositeComponent.js:295:1

  - ReactCompositeComponent.js:282 ReactCompositeComponentWrapper._constructComponent
    ~/react-dom/lib/ReactCompositeComponent.js:282:1

  - ReactCompositeComponent.js:185 ReactCompositeComponentWrapper.mountComponent
    ~/react-dom/lib/ReactCompositeComponent.js:185:1

Until I find a solution, I'll stick to chaining .then statements with my Promises.