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

create react #1

Open
honey-milkc opened this issue Jul 14, 2019 · 1 comment
Open

create react #1

honey-milkc opened this issue Jul 14, 2019 · 1 comment

Comments

@honey-milkc
Copy link
Owner

https://facebook.github.io/create-react-app/docs/getting-started

$ npx create-react-app talk
$ cd talk
$ npm start
@honey-milkc
Copy link
Owner Author

gh-pages 수행

  1. gh-pages를 install
    $ npm install gh-pages --save-dev
  2. 다음 내용 수정
    $ vi package.json 
    homepagescripts/deploy추가
    {
        "name": "talk",
        "version": "0.1.0",
        "private": true,
        "homepage": "https://honey-milkc.github.io/talk",
        "dependencies": {
            "react": "^16.8.6",
            "react-dom": "^16.8.6",
            "react-scripts": "0.9.5"
        },
        "devDependencies": {
            "braces": "^3.0.2",
            "eslint": "^6.0.1",
            "eslint-loader": "^2.2.1",
            "gh-pages": "^2.0.1",
            "js-yaml": "^3.13.1",
            "mime": "^2.4.4",
            "open": "^6.4.0",
            "webpack-dev-server": "^3.7.2"
        },
        "scripts": {
            "start": "react-scripts start",
            "build": "react-scripts build",
            "test": "react-scripts test --env=jsdom",
            "eject": "react-scripts eject",
            "deploy": "npm run build&&gh-pages -d build"
        }
    }
  3. 올리자!
    $ npm run deploy
    앗.. 에러가 난다!
    Error: Cannot find module 'eslint/lib/formatters/stylish'
    
    아무래도 eslint를 version up했더니 생긴 문제로 보인다. 관련 이슈
    일단은 여기서 알려준 해결책으로 수행 : can't publish new version webpack-contrib/eslint-loader#281
    https://www.npmjs.com/package/eslint-loader
    스크린샷 2019-07-14 오후 7 52 21

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

1 participant