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

Component detail not loading #391

Open
BenSwennen opened this issue Sep 13, 2016 · 3 comments
Open

Component detail not loading #391

BenSwennen opened this issue Sep 13, 2016 · 3 comments

Comments

@BenSwennen
Copy link

BenSwennen commented Sep 13, 2016

When I click on the details of my component, I expect a detail view of my component, however a modal pops up with following console errors:

user-bundle.js:1394 Warning: You are manually calling a React.PropTypes validation function for the `visible` prop on `Modal`. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.

Here is my component:

// src/components/Avatar/index.js
import React from "react";

const Avatar = () => (
  <div>This will become an avatar</div>
);

Avatar.propTypes = {
};

export default Avatar;

and my webpack config:

const path = require("path");
const CarteBlanche = require("carte-blanche");
const HtmlWebpackPlugin = require("html-webpack-plugin");

const CarteBlancheConfig = new CarteBlanche({
  componentRoot: "./src/components",
  dest: "components",
});

const HtmlWebpackPluginConfig = new HtmlWebpackPlugin({
  inject: true,
  template: path.join(__dirname, "./src/index.html"),
});

module.exports = {
  entry: "./src/index.js",
  output: {
    path: path.join(__dirname, "/dist"),
    filename: "bundle.js",
  },
  watch: true,

  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /node_modules/,
        loader: "babel-loader",
        query: {
          presets: ["react", "es2015"],
        },
      },
    ],
  },

  resolve: {
    extensions: ["", ".js"],
  },

  plugins: [
    CarteBlancheConfig,
    HtmlWebpackPluginConfig,
  ],
};

out

Can you tell me if I'm doing something wrong?

@cyberpluto
Copy link

Seeing the same, it seems that there is something wrong with the css, because the Card is really on the page, but hidden by the modal

@fredjens
Copy link
Contributor

It is not on the page (you are seeing the front page), and due to the console message it is a JavaScript error... I am experiencing the same too, when i tried to pull carte blanche into an existing project...

@okonet
Copy link
Collaborator

okonet commented Nov 2, 2016

Same here. The error is actually:

index.js:302 Generating metadata failed Error: getNodeFromInstance: Invalid argument.
    at invariant (invariant.js:38)
    at Object.getNodeFromInstance (ReactDOMComponentTree.js:156)
    at Object.findDOMNode (findDOMNode.js:50)
    at Constructor._getDOMTarget (velocity-component.js:128)
    at Constructor.runAnimation (velocity-component.js:107)
    at Constructor.componentDidMount (velocity-component.js:66)
    at ReactCompositeComponentWrapper.invokeComponentDidMountWithTimer (ReactCompositeComponent.js:63)
    at CallbackQueue.notifyAll (CallbackQueue.js:66)
    at ReactReconcileTransaction.close (ReactReconcileTransaction.js:79)
    at ReactReconcileTransaction.closeAll (Transaction.js:202)

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

4 participants