Coder Social home page Coder Social logo

PersonalWebsite-YingTuo

https://tuoying.herokuapp.com

issues

  • Issue 1 After I create-reate-app by using npx create-react-app my-app, I try to run my server by npm start, it throw an error:
events.js:174 throw er; 
  // Unhandled 'error' event ^ Error: getaddrinfo ENOTFOUND x86_64-apple-darwin13.4.0

I sloved this by command unset HOST from Issue1

  • Issue 2 In App.js I coded and error reported:
  class App extends Component () {...}
     TypeError: Cannot set property 'props' of undefined

I sloved this from Issue2

   class App extends Component {...}

In object-oriented programing it's called inheritance, when I extend/inherit a class to use its component, you called by its name and it's not function. Here I extend Component class not function, that's why I don't use parenthesis and also function need a parameter.

  • Issue 3 After I changed the name of src/components/portfolioList to src/components/PortfolioList, I filed to develope my App on heroku:
  remote: npm ERR! code ELIFECYCLE
  remote: npm ERR! errno 1
  remote: npm ERR! mysite@0.1.0 build: `react-scripts build`
  remote: npm ERR! Exit status 1
  remote: npm ERR! 
  remote: npm ERR! Failed at the mysite@0.1.0 build script.
  remote: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  remote: 
  remote: npm ERR! A complete log of this run can be found in:
  remote: npm ERR!     /tmp/npmcache.u1Pt3/_logs/2020-06-12T02_15_56_993Z-debug.log
  remote: 
  remote: -----> Build failed
  remote:        
  remote:        We're sorry this build is failing! You can troubleshoot common issues here:
  remote:        https://devcenter.heroku.com/articles/troubleshooting-node-deploys
  remote:        
  remote:        Some possible problems:
  remote:        
  remote:        - Node version not specified in package.json
  remote:          https://devcenter.heroku.com/articles/nodejs-support#specifying-a-node-js-version
  remote:        
  remote:        Love,
  remote:        Heroku
  remote:        
  remote:  !     Push rejected, failed to compile Node.js app.
  remote: 
  remote:  !     Push failed
  remote: Verifying deploy...
  remote: 
  remote: !	Push rejected to tuoying.
  remote: 
  To https://git.heroku.com/tuoying.git
  ! [remote rejected]   master -> master (pre-receive hook declined)
  error: failed to push some refs to 'https://git.heroku.com/tuoying.git'

After I changed it back to src/components/portfolioList, it works! But I do not know why...

tuoying96's Projects

leetcode icon leetcode

Provide all my solutions and explanations in Chinese for all the Leetcode coding problems.

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.