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

production build error on "Building static HTML for pages" #1

Open
johnkorzhuk opened this issue May 2, 2018 · 0 comments
Open

production build error on "Building static HTML for pages" #1

johnkorzhuk opened this issue May 2, 2018 · 0 comments

Comments

@johnkorzhuk
Copy link
Owner

johnkorzhuk commented May 2, 2018

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.

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

No branches or pull requests

1 participant