inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

웹 게임을 만들며 배우는 React

2-5. 웹팩으로 빌드하기

npx webpack 할 때 오류....

3868

seungyel

작성한 질문수 1

0

ERROR in ./client.jsx 1:12-28 Module not found: Error: Can't resolve 'react' in 'C:\Users\user\Desktop\react-project\lecture' ERROR in ./client.jsx 3:15-35 Module not found: Error: Can't resolve 'react-dom' in 'C:\Users\user\Desktop\react-project\lecture' ERROR in ./client.jsx 5:16-38 Module not found: Error: Can't resolve './WordRelay' in 'C:\Users\user\Desktop\react-project\lecture' 3 errors have detailed information that is not shown. Use 'stats.errorDetails: true' resp. '--stats-error-details' to show it. WordRelay (webpack 5.47.0) compiled with 3 errors in 760 ms-
이런게 발생하네요...
https://github.com/2winyear/react-project
제 깃,,,주소입니다

react

답변 1

0

제로초(조현영)

npm i react react-dom 안하셨나보네요

0

seungyel

했는데도 안되네요,,,

0

제로초(조현영)

안 하신게 확실합니다. node_modules에 react랑 react-dom이 없거든요. react-project/lecture에서 설치하신게 맞나요?

0

seungyel

네! 진짜 했는데,,,

up to date, audited 286 packages in 932ms

26 packages are looking for funding

  run `npm fund` for details

found 0 vulnerabilities 이렇게 나오고

ERROR in ./client.jsx 5:16-38

Module not found: Error: Can't resolve './WordRelay' in 'C:\Users\user\Desktop\react-project\lecture'   

resolve './WordRelay' in 'C:\Users\user\Desktop\react-project\lecture'

  using description file: C:\Users\user\Desktop\react-project\lecture\package.json (relative path: .)   

    Field 'browser' doesn't contain a valid alias configuration

    using description file: C:\Users\user\Desktop\react-project\lecture\package.json (relative path: ./WordRelay)

      no extension

        Field 'browser' doesn't contain a valid alias configuration

        C:\Users\user\Desktop\react-project\lecture\WordRelay doesn't exist

      .js

        Field 'browser' doesn't contain a valid alias configuration

        C:\Users\user\Desktop\react-project\lecture\WordRelay.js doesn't exist

      .json

        Field 'browser' doesn't contain a valid alias configuration

        C:\Users\user\Desktop\react-project\lecture\WordRelay.json doesn't exist

      .wasm

        Field 'browser' doesn't contain a valid alias configuration

        C:\Users\user\Desktop\react-project\lecture\WordRelay.wasm doesn't exist

      as directory

        C:\Users\user\Desktop\react-project\lecture\WordRelay doesn't exist

WordRelay (webpack 5.47.0) compiled with 1 error in 2812 ms

이런 에러메세지가 뜨네요 ,,

0

제로초(조현영)

에러 메시지가 바뀌었네요. 이제는 다른 에러입니다. 저와 webpack.config.js가 다르네요.

https://github.com/ZeroCho/react-webgame/blob/master/2.%EB%81%9D%EB%A7%90%EC%9E%87%EA%B8%B0/webpack.config.js

npm run dev 실행 시 포트가 안뜨는 문제

0

236

2

timeouts.current를 useEffect 의 input값으로 넣었을때

0

97

2

렌더링 테스트 코드 (Hooks)

0

93

1

Cannot find package 'react-refesh' 이런 에러 뜨시는 분들 보세요.

0

165

1

해당 에러 뜨는 분들 보세요. "Uncaught TypeError: ReactDom.createRoot is not a function"

1

207

1

강사님 레포지토리에서 코드 복사 시 master 브랜치 말고 react18 브랜치꺼 복붙하세요ㅠㅠ

0

105

1

useMemo와 useCallback 사용 시기

0

218

2

onRightClickTd가 작동을 하지 않습니다.

0

236

1

action.type 불러오는 방식

0

225

2

onClickRedo 질문

0

176

1

const Try = require(./Try) 빨간줄

0

259

1

npx webpack 실행시

0

324

1

지뢰찾기 강좌에서 빈칸들 한번에 열기 파트에서 여쭤보고싶은부분이 있어서 글 올립니다.

0

241

1

강좌에서 다루지 않은 기능들은 어떻게 학습하면 좋을까요?

0

318

1

react devtool이 enable 않됩니다.

0

544

2

React 랜더링이 되지 않습니다.

0

421

2

비동기로 동작하는 setState에 대해서

0

337

1

npm run dev 할 때 에러발생

0

494

2

memo, PureComponenet, shouldComponentUpdate 관련 질문

0

210

1

devMiddleware의 필요성

0

358

1

리액트에서 화살표 함수를 사용해야하는 이유

0

946

2

path.join관련질문

0

287

2

2-9. 웹팩 데브 서버와 핫 리로딩 설치과정 시 에러

0

384

1

next.js 에서 이와 비슷한 예제를 돌리고있는데 react랑 달라서 질문 드립니

1

502

4