Giter Site home page Giter Site logo

Comments (9)

ro-ka avatar ro-ka commented on July 18, 2024

I’m sorry but I cannot replicate the issue… Can you provide a bare minimum example where the error occurs?

from react-geosuggest.

14850842 avatar 14850842 commented on July 18, 2024
// React
var React = require("react");

var Geosuggest = require("geosuggest");

// Router
var Router = require("react-router");
var RouteHandler = Router.RouteHandler;

// Child Components
var Nav = require("./nav");

// Component
var App = React.createClass({
  displayName: "App",
  propTypes: {},
  mixins: [],

  getInitialState: function () { return null; },

  componentWillMount: function () {},

  componentWillUnmount: function () {},

  render: function () {
    return (
      <div className="epicureContainer">
        <Geosuggest/>
      </div>
    );
  }
});

module.exports = App;

In console:

ERROR in ./client/components/app.jsx
Module not found: Error: Cannot resolve module 'geosuggest' in /Users/sergiopellegrini/Sites/recipes-flux/client/components
 @ ./client/components/app.jsx 4:17-38

from react-geosuggest.

loris avatar loris commented on July 18, 2024

Use var Geosuggest = require("react-geosuggest"); instead

from react-geosuggest.

ro-ka avatar ro-ka commented on July 18, 2024

@14850842 Does that help? Is it working now?
@loris Thanks for answering!

from react-geosuggest.

14850842 avatar 14850842 commented on July 18, 2024

Got a step further. Thanks for the help so far.

Warning: This JSX uses a plain function. Only React components are valid in React's JSX transform.
warning.js:48 Warning: Something is calling a React component directly. Use a factory or JSX instead. See: https://fb.me/react-legacyfactory
ReactClass.js:842 Uncaught TypeError: Cannot read property '__reactAutoBindMap' of null
(Something is calling a React component directly)

from react-geosuggest.

ro-ka avatar ro-ka commented on July 18, 2024

Did you follow the suggestions at the link? (https://fb.me/react-legacyfactory)
Are you using JSX or plain JS?

from react-geosuggest.

14850842 avatar 14850842 commented on July 18, 2024

Calling as prescibed using JSX.

from react-geosuggest.

ro-ka avatar ro-ka commented on July 18, 2024

As far as I understand the link it is fine the way it is. Does that error still occur when you use the example above?

Btw., I’ll update the readme because of the wrong require statement. Thanks for reporting. :)

from react-geosuggest.

14850842 avatar 14850842 commented on July 18, 2024

Thanks. I got it running now.

from react-geosuggest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.