client 빌드 및 s3에 배포 준비

appstew·2022년 11월 6일
0

stackoverflow clone

목록 보기
2/2

npm run build 로 다른분들은 client 빌드 가 잘 진행된다는데,

compile failed
[ESLint]
cannot resolve module ...

의 에러가 발생하였다.

혹시 몰라 yarn build 를 해보았다.

완벽하진 않아도 최소한 일단 build 폴더 안에 index.html 및 js, css 파일이 빌드 되었다.

(npm run build 에서는 build 폴더 안에 달랑 favicon 파일 하나만 생성되었다..)

[23:16:29] [/javatest/hrd/idea/preProject/seb40_pre_018/client] git(develop) 🔥 yarn build                                   
yarn run v1.22.17
$ react-scripts build
Creating an optimized production build...
Compiled with warnings.

Failed to parse source map from '/javatest/hrd/idea/preProject/seb40_pre_018/client/node_modules/@toast-ui/editor/dist/purify.js.map' file: Error: ENOENT: no such file or directory, open '/javatest/hrd/idea/preProject/seb40_pre_018/client/node_modules/@toast-ui/editor/dist/purify.js.map'

Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.

File sizes after gzip:

  335.3 kB   build/static/js/main.f916cfca.js
  111.47 kB  build/static/css/main.df0aba77.css

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  yarn global add serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

Done in 43.62s.

이제 이걸 실행해보기 위해 찾던 중

npm install -g serve 를 했더니

npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/serve
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve'
npm ERR!  [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/serve'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/serve'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/dami/.npm/_logs/2022-11-06T14_25_43_814Z-debug-0.log
profile
소프트웨어엔지니어가 되기 위해 달리는 중

0개의 댓글