• 카테고리

    질문 & 답변
  • 세부 분야

    프론트엔드

  • 해결 여부

    미해결

npx webpack 할 때 오류....

21.07.28 16:56 작성 조회수 3.64k

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
제 깃,,,주소입니다

답변 1

답변을 작성해보세요.

0

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

seungyel님의 프로필

seungyel

질문자

2021.07.30

했는데도 안되네요,,,

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

seungyel님의 프로필

seungyel

질문자

2021.07.30

네! 진짜 했는데,,,

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

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

에러 메시지가 바뀌었네요. 이제는 다른 에러입니다. 저와 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