Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Generating metadata failed Error: getNodeFromInstance: Invalid argument. #389

Open
MicheleBertoli opened this issue Aug 19, 2016 · 7 comments

Comments

@MicheleBertoli
Copy link

hey!
I tried to setup carte-blanche starting from an app created with create-react-app but I couldn't make it work.
I always get Generating metadata failed Error: getNodeFromInstance: Invalid argument. when I click on a component in the sidebar.

steps to reproduce:

  1. create app
npm i create-react-app -g // 0.2.0
create-react-app carte-blanche-test
cd carte-blanche-test
npm run eject
npm i carte-blanche --save-dev // 0.3.1
  1. edit webpack config
var CarteBlanche = require('carte-blanche');
...
plugins: [
  ...,
  new CarteBlanche({
    componentRoot: './src'
  })
]
  1. start app
npm start
  1. select component
    open http://localhost:3000/carte-blanche
    click "App" in the sidebar
@tweettypography
Copy link

I'm encountering the same issue. Did you get it figured out?

@S-Venkat-S
Copy link

I am also having this same issue.

@tandrewnichols
Copy link

Some similar issues in other repos suggested: 1) Updating react and react-dom to 15.3.1 (didn't work for me), 2) downgrading react and react-dom to 15.1.0 (also didn't work for me). Also tried using node 5.5 as that's specified under "engines." This didn't work either. Giving up.

@tandrewnichols
Copy link

Alternatively, check out @kadira/storybook, which requires a bit more setup than this, but actually works.

@S-Venkat-S
Copy link

@mxstbr Any update on this issue ? 😢

@fionawhim
Copy link

My quick read on this issue is that React is being added to the page twice. Once by the client-bundle.js file that's precompiled and distributed with carte-blanche, and once by the user-bundle that’s built from your own code (and presumably requires React).

I wonder if it’s possible to build the client-bundle code dynamically, or alternately to try and prevent the user-bundle React from affecting anything globally outside of the iframe.

@fionawhim
Copy link

Alternately it may be that the bundled React is one of the 15.1.x versions that break on findDOMNode. I've rebuilt the project from master and can't reproduce the problem anymore.

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

5 participants