Git Product home page Git Product logo

sam-library-frontend's People

Contributors

byumark avatar

Stargazers

 avatar

Watchers

 avatar  avatar

sam-library-frontend's Issues

Error with yarn start

Uncaught SyntaxError: The URL 'http:/sockjs-node' is invalid at new SockJS (sockjs.js:678) at new SockJSClient (SockJSClient.js:39) at initSocket (socket.js:20) at Object.<anonymous> (index.js:176) at Object.../../webpack-dev-server/client/index.js?http://[http://localhost]:3000 (index.js:45) at __webpack_require__ (bootstrap:726) at fn (bootstrap:100) at Object.1 (shared.js:120) at __webpack_require__ (bootstrap:726) at bootstrap:793

Error on Running.

The following is the result of running yarn install and yarn start after adding
a url to config.js like so:

export default {
  apiRoot: "https://ip6random.execute-api.eu-west-3.amazonaws.com/Stage"
};

If your dont add the url to config.js, you dont get the error.

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports. Check the render method of `BookItem`.

  44 | axios(`${config.apiRoot}/books`, {
  45 |   method: "GET"
  46 | }).then(response => {
> 47 |   this.setState({
  48 |     books: response.data.sort((a, b) => {
  49 |       if (a.title < b.title) return -1;
  50 |       if (a.title > b.title) return 1;

Seems simple enough to fix. Will post if I get to it.

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.