Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error when I try to load ScrollBarWrapper #35

Open
artsx opened this issue Oct 4, 2016 · 4 comments
Open

Error when I try to load ScrollBarWrapper #35

artsx opened this issue Oct 4, 2016 · 4 comments

Comments

@artsx
Copy link

artsx commented Oct 4, 2016

Hello, I want try your module and I've error :
build.js:15397 Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method ofProfil.

build.js:14954 Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. Check the render method ofProfil.

My code source :

import React from 'react';
import {
  Grid,
  Cell
} from "react-mdl";
var ScrollbarWrapper = require('react-scrollbar').ScrollbarWrapper;
var ProfilHeader = require('./children/profilHeader/ProfilHeader.js');
var ProfilExperiences = require('./children/profilExperiences/ProfilExperiences.js');
var ProfilEducations = require('./children/profilEducations/ProfilEducations.js');
var ProfilHobbies = require('./children/profilHobbies/ProfilHobbies.js');
var ProfilSkills = require('./children/profilSkills/ProfilSkills.js');
var ProfilLanguages = require('./children/profilLanguages/ProfilLanguages.js');
import './styles/less/Profil.less';

var Profil = React.createClass({

    render: function() {
        return (
          <ScrollbarWrapper>
            <Grid className="searchList" style={{ paddingRight: '15px'}}>
              <Cell col={12} tablet={12} phone={12}>
                <div className="profil">
                  <ProfilHeader />
                  <ProfilExperiences />
                  <ProfilEducations />
                  <ProfilHobbies />
                  <ProfilSkills />
                  <ProfilLanguages />
                </div>
              </Cell>
            </Grid>
          </ScrollbarWrapper>
        );
    }
});

module.exports = Profil;

Any idea ?

@artsx
Copy link
Author

artsx commented Oct 4, 2016

it's ok, I've changed import by :
import ScrollbarWrapper from 'react-scrollbar';

@artsx artsx closed this as completed Oct 4, 2016
@artsx artsx reopened this Oct 4, 2016
@artsx
Copy link
Author

artsx commented Oct 4, 2016

hmm, with this syntax, it is the module react-scrollbar that is considered, how is added .ScrollBarWrapper variable with this syntax like
var ScrollbarWrapper = require('react-scrollbar').ScrollbarWrapper;

@fritx
Copy link

fritx commented Nov 30, 2016

Failed to compile.

Error in ./~/react-scrollbars/lib/components/scrollbar-wrapper.js
Module not found: 'react/addons' in /Users/dji/t/my-app/node_modules/react-scrollbars/lib/components

 @ ./~/react-scrollbars/lib/components/scrollbar-wrapper.js 2:12-35

@patrickgalbraith
Copy link
Contributor

For ES6 it would be import { ScrollbarWrapper } from 'react-scrollbar'

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

No branches or pull requests

3 participants