Skip to content

Conversation

@jbolda
Copy link
Contributor

@jbolda jbolda commented Jul 19, 2017

Turns out the error only showed up on build. Too many refactors and I forgot that to update that location was expected on this.props.

@jbolda
Copy link
Contributor Author

jbolda commented Jul 19, 2017

@KyleAMathews this fixes the error mentioned in #1492.

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 19, 2017

Deploy preview ready!

Built with commit 3b808a3

https://deploy-preview-1547--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 19, 2017

Deploy preview ready!

Built with commit 3b808a3

https://deploy-preview-1547--using-drupal.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Jul 19, 2017

Deploy preview ready!

Built with commit 3b808a3

https://deploy-preview-1547--gatsbyjs.netlify.com

@KyleAMathews
Copy link
Contributor

The site builds now! But looks like it's missing CSS somehow https://596ea4f2cf321c3016b61529--using-javascript-transforms.netlify.com/

@jbolda
Copy link
Contributor Author

jbolda commented Jul 19, 2017

It is throwing a minified react error.... hmm.... I think the error is just breaking the scss import here. This would be more helpful if it showed up in develop :)

@jbolda
Copy link
Contributor Author

jbolda commented Jul 19, 2017

The error is the following for future self:

reactProdInvariant.js:31 Uncaught Error: Minified React error #130; visit http://facebook.github.io/react/docs/error-decoder.html?invariant=130&args[]=object&args[]=%20Check%20the%20render%20method%20of%20%60t%60. for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at n (reactProdInvariant.js:31)
    at d.i [as _instantiateReactComponent] (instantiateReactComponent.js:74)
    at d.performInitialMount (ReactCompositeComponent.js:366)
    at d.mountComponent (ReactCompositeComponent.js:257)
    at Object.mountComponent (ReactReconciler.js:45)
    at d.performInitialMount (ReactCompositeComponent.js:370)
    at d.mountComponent (ReactCompositeComponent.js:257)
    at Object.mountComponent (ReactReconciler.js:45)
    at d.performInitialMount (ReactCompositeComponent.js:370)
    at d.mountComponent (ReactCompositeComponent.js:257)

sw.js:279 Uncaught (in promise) TypeError: Request scheme 'chrome-extension' is unsupported
    at sw.js:279
    at <anonymous>

@jbolda
Copy link
Contributor Author

jbolda commented Jul 20, 2017

I am still getting a minified react error even removing anything that seems like uglification. I started to dig into the chrome dev tools, and paused on exception. The following is the stack trace.

n (reactProdInvariant.js?3afb:35)
a (instantiateReactComponent.js?852a:74)
performInitialMount (ReactCompositeComponent.js?d2b3:366)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
performInitialMount (ReactCompositeComponent.js?d2b3:370)
mountComponent (ReactCompositeComponent.js?d2b3:257)
mountComponent (ReactReconciler.js?399b:45)
s (ReactMount.js?26a9:104)
perform (Transaction.js?f15f:143)
i (ReactMount.js?26a9:126)
perform (Transaction.js?f15f:143)
batchedUpdates (ReactDefaultBatchingStrategy.js?e9be:62)
a (ReactUpdates.js?8e6b:97)
_renderNewRootComponent (ReactMount.js?26a9:319)
_renderSubtreeIntoContainer (ReactMount.js?26a9:401)
render (ReactMount.js?26a9:422)
(anonymous) (production-app.js:198)
i (loader.js:319)
(anonymous) (loader.js:331)
(anonymous) (loader.js:112)
(anonymous) (loader.js:95)
(anonymous) (index.js?9862:11)
u (patch.js:18)
(anonymous) (patch.js:39)
window.webpackJsonp (bootstrap 5dd8316f12fa934ebd71:20)
(anonymous) (page-component---src-articles-2017-03-09-choropleth-on-d-3-v-4-index-js-0b00d0069661f42b303b.js:1)

The page component fails on line one, and the next two files are within the core.

for bootstrap, line 20 is the third line:

 		if(parentJsonpFunction) parentJsonpFunction(chunkIds, moreModules);
 		while(callbacks.length)
 			callbacks.shift().call(null, __webpack_require__);
 		if(moreModules[0]) {
 			installedModules[0] = 0;
 			return __webpack_require__(0);
 		}
 	};

The webpack footer for patch is:

//////////////////
// WEBPACK FOOTER
// ./~/gatsby/dist/loaders/gatsby-module-loader/patch.js
// module id = ./node_modules/gatsby/dist/loaders/gatsby-module-loader/patch.js
// module chunks = 15178676390636814000

If I click the patch.js, the stack changes and everything and including this file say line 96, but the file only goes up to line 95.

Long story short, I don't see any code I recognize.

@KyleAMathews
Copy link
Contributor

KyleAMathews commented Jul 20, 2017

@jbolda
Copy link
Contributor Author

jbolda commented Jul 20, 2017

well jeez, I figured out the minification error...

on another note, the styles still don't import on build.

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 31a110b

https://app.netlify.com/sites/image-processing/deploys/597160867960b106d89916fc

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 31a110b

https://app.netlify.com/sites/using-remark/deploys/597160877960b106d8991708

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 31a110b

https://app.netlify.com/sites/using-glamor/deploys/597160867960b106d89916ff

@KyleAMathews
Copy link
Contributor

@KyleAMathews
Copy link
Contributor

Deploy preview failed.

Built with commit 31a110b

https://app.netlify.com/sites/using-contentful/deploys/597160867960b106d8991705

@jbolda
Copy link
Contributor Author

jbolda commented Jul 22, 2017

I think we can just merge this and I will clean up the the remaining component error in another PR since I fixed the root issues for the initial reason for the PR.

Copy link
Contributor

@KyleAMathews KyleAMathews left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's some conflicts as well that need resolved.

Also you said the layout query was causing trouble and should be removed?

import * as PropTypes from "prop-types"
import Helmet from 'react-helmet';

let stylesStr
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about you just remove this file altogether and use the default html.js? It already has inlining of css setup, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me. Deleted.

@KyleAMathews
Copy link
Contributor

@jbolda could you get this example site fixed up? It's broken still which means our Netlify check is failing every time.

@jbolda
Copy link
Contributor Author

jbolda commented Jul 28, 2017

I don't know what the deal with the conflicts were. It was the exact same code in master vs my branch. shrugs

@jbolda
Copy link
Contributor Author

jbolda commented Jul 28, 2017

@KyleAMathews I certainly hope that is everything! Turns out the "missing" page error that only shows up in build/serve is because I didn't have trailing slashes.

@KyleAMathews
Copy link
Contributor

Looks like Netlify is happy now! thanks!

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

Successfully merging this pull request may close these issues.

3 participants