• 로그인
  • 장바구니에 상품이 없습니다.

home2 게시판 React 게시판 pwa 때문에 새로 프로젝트를 만들었는데요

pwa 때문에 새로 프로젝트를 만들었는데요

  • 이 주제에는 1개 답변, 2명 참여가 있으며 codingapple4 년 전에 전에 마지막으로 업데이트했습니다.
2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 글쓴이
  • #10372

    이도아
    참가자

    PS C:\Users\나\Desktop\프로젝트\store> npm run build

    > store@0.1.0 build
    > react-scripts build
    Creating an optimized production build...
    Failed to compile.

    src\index.js
    Line 85:1: 'serviceWorkerRegistration' is not defined no-undef

    Search for the keywords to learn more about each error.

    npm ERR! code 1
    npm ERR! path C:\Users\나\Desktop\프로젝트\store
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c react-scripts build

    npm ERR! A complete log of this run can be found in:
    PS C:\Users\나\Desktop\프로젝트\store> npm build
    Top hits for "build"

     

     

    PS C:\Users\나\Desktop\프로젝트\store> npm run build

    > store@0.1.0 build
    > react-scripts build
    Creating an optimized production build...
    Failed to compile.

    .\src\Detail.js
    Cannot find module: 'styled-components'. Make sure this package is installed.

    You can install this package by running: npm install styled-components.

    npm ERR! code 1
    npm ERR! path C:\Users\나\Desktop\프로젝트\store
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c react-scripts build

    npm ERR! A complete log of this run can be found in:
    PS C:\Users\나\Desktop\프로젝트\store> npm install styled-components

    added 11 packages, and audited 2113 packages in 7s

    149 packages are looking for funding
    run npm fund for details

    100 vulnerabilities (85 moderate, 15 high)

    To address issues that do not require attention, run:
    npm audit fix

    To address all issues (including breaking changes), run:
    npm audit fix --force

    Run npm audit for details.
    PS C:\Users\나\Desktop\프로젝트\store> npm run build

    > store@0.1.0 build
    > react-scripts build
    Creating an optimized production build...
    Failed to compile.

    src\index.js
    Line 85:1: 'serviceWorkerRegistration' is not defined no-undef

    Search for the keywords to learn more about each error.

    npm ERR! code 1
    npm ERR! path C:\Users\나\Desktop\프로젝트\store
    npm ERR! command failed
    npm ERR! command C:\Windows\system32\cmd.exe /d /s /c react-scripts build

    npm ERR! A complete log of this run can be found in:
    PS C:\Users\나\Desktop\프로젝트\store> npm build
    Top hits for "build"

     

     

    npm install 관련된거 전부 설치하고 npm run build 쳤더니, 저런 에러가 뜨네요

    npm start 눌러서 사이트 확인 결과 부트스트랩 , css도 제대로 작동 하지 않는 것같습니다.

    물론 부트스트랩도 설치 했구요!

    이유가 무엇일까요...?

    #10379

    codingapple
    키 마스터

    store라는 이름의 프로젝트로 이사갈 때 

    파일복붙 뿐만 아니라 설치하셨던 라이브러리들도 전부 다시 설치해주셔야합니다 

    bootstrap이나 styled component 이런거를 쓰셨다면 설치과정을 다시 밟도록 합시다 

    그리고 index.js에 있던 것들도 까먹지않고 잘 복사하셔야할듯요 

2 글 보임 - 1 에서 2 까지 (총 2 중에서)
  • 답변은 로그인 후 가능합니다.

About

현재 월 700명 신규수강중입니다.

  (09:00~20:00) 빠른 상담은 카톡 플러스친구 코딩애플 (링크)
  admin@codingapple.com
  이용약관
ⓒ Codingapple, 강의 예제, 영상 복제 금지
top

© Codingapple, All rights reserved. 슈퍼로켓 에듀케이션 / 서울특별시 강동구 고덕로 19길 30 / 사업자등록번호 : 212-26-14752 온라인 교육학원업 / 통신판매업신고번호 : 제 2017-서울강동-0002 호 / 개인정보관리자 : 박종흠