Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Netlify Deploy Fail #37

Closed
SachaG opened this issue Dec 2, 2017 · 6 comments
Closed

Netlify Deploy Fail #37

SachaG opened this issue Dec 2, 2017 · 6 comments

Comments

@SachaG
Copy link
Member

SachaG commented Dec 2, 2017

6:08:06 PM: error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND
6:08:06 PM: 
  322 | 
  323 | var sankeyLinkHorizontal = function() {
> 324 |   return d3Shape.linkHorizontal()
      | ^
  325 |       .source(horizontalSource)
  326 |       .target(horizontalTarget);
  327 | };


  WebpackError: d3Shape.linkHorizontal is not a function
  
  - d3-sankey.js:324 sankeyLinkHorizontal
    ~/d3-sankey/build/d3-sankey.js:324:1
  
  - SankeyLinks.js:41 Object.exports.__esModule
    ~/nivo/lib/components/charts/sankey/SankeyLinks.js:41:1
  
  - Sankey.js:39 Object.<anonymous>
    ~/nivo/lib/components/charts/sankey/Sankey.js:39:1
  
  - index.js:5 Object.exports.__esModule
    ~/nivo/lib/components/charts/sankey/index.js:5:1
  
  - index.js:101 Object.exports.__esModule
    ~/nivo/lib/index.js:101:1
  
  - AffinityChord.js:4 Object.<anonymous>
    src/components/charts/AffinityChord.js:4:1

Since we don't use the Sankey diagram, is there a way we could drop the dependency? Would we have to fork Nivo? Actually should we create a version of Nivo that only includes the dependencies we need to make the overall bundle lighter?

@michaelrambeau
Copy link
Collaborator

michaelrambeau commented Dec 3, 2017

Running the project in the cloud

I'm trying to understand what's wrong on the build server, using an online code editor (c9.io) to check what is happening on a Linux machine with limited resource (Disk: 2 GB, RAM: 512 M).

STEP 1: npm install

Project dependencies are huge! it took me 20 minutes to install everything.

  • 2150 packages installed in 1401.22s (!)
  • Disk: 868 MB

STEP 2: npm run build

I got an other error when trying to build the project:

success Building CSS — 24.530 s
success Building production JavaScript bundles — 527.984 s
⠠ Building static HTML for pages[Function: Document]

error Building static HTML for pages failed

See our docs page on debugging HTML builds for help https://goo.gl/yL9lND

  27 |   message += ' for the full message or use the non-minified dev environment' + ' for full errors and additional helpful warnings.';
  28 | 
> 29 |   var error = new Error(message);
     | ^
  30 |   error.name = 'Invariant Violation';
  31 |   error.framesToPop = 1; // we don't care about reactProdInvariant's own frame
  32 | 


  WebpackError: 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  %60Layout%60. for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

  - reactProdInvariant.js:29 reactProdInvariant
    ~/react-dom/lib/reactProdInvariant.js:29:1
  
  - instantiateReactComponent.js:72 instantiateReactComponent
    ~/react-dom/lib/instantiateReactComponent.js:72:1
  
  - ReactChildReconciler.js:42 instantiateChild
    ~/react-dom/lib/ReactChildReconciler.js:42:1

The error comes from react-dom package:

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
Check the render method of `Layout`

still under investigation...

@plouc
Copy link
Member

plouc commented Dec 3, 2017

The build now pass both locally and on travis. There was an empty page OpinionsWIP.js.

@plouc
Copy link
Member

plouc commented Dec 3, 2017

@plouc
Copy link
Member

plouc commented Dec 3, 2017

@SachaG is it possible to have the build's logs somewhere?
I cannot reproduce the problem with the sankey, neither on my machine, nor on travis :/

@SachaG
Copy link
Member Author

SachaG commented Dec 4, 2017

Netlify explain how to debug their build process here: https://www.netlify.com/blog/2016/10/18/how-our-build-bots-build-sites/

But actually we could also just deploy on GitHub pages, I'm not sure if it's worth the time to find out why Netlify is not working…

@plouc
Copy link
Member

plouc commented Dec 4, 2017

Fixed => see https://philatist-albert-72527.netlify.com/

@plouc plouc closed this as completed Dec 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants