Skip to content
New issue

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

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

Already on GitHub? # to your account

Gatsby Build Bug #641

Closed
violetcrestedwren opened this issue Jan 19, 2017 · 9 comments
Closed

Gatsby Build Bug #641

violetcrestedwren opened this issue Jan 19, 2017 · 9 comments

Comments

@violetcrestedwren
Copy link

I've been tracking a bug in our site which only presents when using the gatsby build process. When running the site with gatsby develop, it functions perfectly.

The issue is that the first time a user visits the page, any internal links won't work on the first click - all subsequent clicks, clicks after page refresh, etc. work fight as long as the site remains cached. Open the site in a new incognito tab and the bug presents again.

The bug can be found at https://open.fda.gov/ and our open source repo is https://github.com/FDA/open.fda.gov .

I'm not positive the issue is in the Gatsby build process, but it seems likely.

@KyleAMathews
Copy link
Contributor

You have errors in your console on open.fda.gov. Try commenting out the uglify settings from node_modules/gatsby/dist/utils/webpack.conf.js and building so you can see what the problem is.

@violetcrestedwren
Copy link
Author

Commenting out the uglify settings had no effect.

@KyleAMathews
Copy link
Contributor

On what?

@violetcrestedwren
Copy link
Author

It did not expose any errors hidden in the minified environment or provide any apparent change.

@KyleAMathews
Copy link
Contributor

What does your console say now?

@violetcrestedwren
Copy link
Author

violetcrestedwren commented Jan 20, 2017

Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings. at invariant (bundle.js:8809) at precacheChildNodes (bundle.js:12012) at Object.getNodeFromInstance (bundle.js:12088) at Object.didPutListener (bundle.js:26242) at Object.putListener (bundle.js:13197) at Object.putListener (bundle.js:17863) at CallbackQueue.notifyAll (bundle.js:15151) at ReactReconcileTransaction.close (bundle.js:24474) at ReactReconcileTransaction.closeAll (bundle.js:15839) at ReactReconcileTransaction.perform (bundle.js:15786)

SimpleEventPlugin.js:620 Uncaught TypeError: Cannot read property 'remove' of undefined at Object.willDeleteListener (SimpleEventPlugin.js:620) at Object.deleteAllListeners (EventPluginHub.js:159) at ReactDOMComponent.unmountComponent (ReactDOMComponent.js:889) at Object.unmountComponent (ReactReconciler.js:65) at ReactCompositeComponentWrapper.unmountComponent (ReactCompositeComponent.js:329) at Object.unmountComponent (ReactReconciler.js:65) at Object.unmountChildren (ReactChildReconciler.js:118) at ReactDOMComponent.unmountChildren (ReactMultiChild.js:325) at ReactDOMComponent.unmountComponent (ReactDOMComponent.js:887) at Object.unmountComponent (ReactReconciler.js:65)

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jan 20, 2017 via email

@violetcrestedwren
Copy link
Author

Changed line 99 in webpack.config.js:

}), new _webpack2.default.optimize.DedupePlugin(), new _extractTextWebpackPlugin2.default('styles.css')]//, new _webpack2.default.optimize.UglifyJsPlugin()];

@violetcrestedwren
Copy link
Author

Looks like uglify was disabled this time.
Uncaught Error: Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings. at a (bundle.js:3) at o (bundle.js:4) at Object.c [as getNodeFromInstance] (bundle.js:4) at Object.didPutListener (bundle.js:21) at Object.putListener (bundle.js:4) at Object.i (bundle.js:19) at a.notifyAll (bundle.js:5) at a.close (bundle.js:20) at a.closeAll (bundle.js:5) at a.perform (bundle.js:5)
SimpleEventPlugin.js:620 Uncaught TypeError: Cannot read property 'remove' of undefined at Object.willDeleteListener (SimpleEventPlugin.js:620) at Object.deleteAllListeners (EventPluginHub.js:159) at unmountComponent (ReactDOMComponent.js:889) at Object.unmountComponent (ReactReconciler.js:65) at d.unmountComponent (ReactCompositeComponent.js:329) at Object.unmountComponent (ReactReconciler.js:65) at Object.unmountChildren (ReactChildReconciler.js:118) at unmountChildren (ReactMultiChild.js:325) at unmountComponent (ReactDOMComponent.js:887) at Object.unmountComponent (ReactReconciler.js:65)

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

No branches or pull requests

2 participants