-
글쓴이글
-
2021년 6월 15일 14:37 #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-undefSearch 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 buildnpm 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 buildnpm ERR! A complete log of this run can be found in:
PS C:\Users\나\Desktop\프로젝트\store> npm install styled-componentsadded 11 packages, and audited 2113 packages in 7s
149 packages are looking for funding
runnpm fund
for details100 vulnerabilities (85 moderate, 15 high)
To address issues that do not require attention, run:
npm audit fixTo address all issues (including breaking changes), run:
npm audit fix --forceRun
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-undefSearch 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 buildnpm 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도 제대로 작동 하지 않는 것같습니다.
물론 부트스트랩도 설치 했구요!
이유가 무엇일까요...?
2021년 6월 15일 16:25 #10379
codingapple키 마스터store라는 이름의 프로젝트로 이사갈 때
파일복붙 뿐만 아니라 설치하셨던 라이브러리들도 전부 다시 설치해주셔야합니다
bootstrap이나 styled component 이런거를 쓰셨다면 설치과정을 다시 밟도록 합시다
그리고 index.js에 있던 것들도 까먹지않고 잘 복사하셔야할듯요
-
글쓴이글
- 답변은 로그인 후 가능합니다.