[React] npm start 오류(throw err;) 해결하기

2022. 7. 1. 22:17·Stack/React

node.js를 설치하고 npm start를 했는데 이와 같은 오류가 발생했다.

 

https://github.com/nodejs/help/issues/2644

 

internal/modules/cjs/loader.js:983 throw err; ^ Could you help me with this code? · Issue #2644 · nodejs/help

internal/modules/cjs/loader.js:983 throw err; ^ Error: Cannot find module 'D:\Bryan Durán\Desktop\chat-javascript-fullstack-master\index.js' at Function.Module._resolveFilename (internal/mo...

github.com

위 github를 참고한 결과, 해결방법을 찾았다 !

 

1. npm의 캐시를 삭제한다. (터미널에 입력)

npm cache clean --force

2. node_modules 폴더를 삭제한다.

3. package-lock.json 파일도 삭제한다.

4. 다시 npm을 설치한다 (터미널에 입력)

npm install

그 후 npm start를 하면 잘 실행됨 ~

'Stack > React' 카테고리의 다른 글

[React] 파일 업로드 관리하기  (0) 2022.07.04
[React] 상태관리(useState / useReducer) 복습  (0) 2022.07.04
[React] Lamp 쇼핑몰 구현하기 4 (Sqlite 연동)  (0) 2022.07.01
[React] Lamp 쇼핑몰 구현하기 3 (서버에 연결하기)  (0) 2022.07.01
[React] Lamp 쇼핑몰 구현하기 2 (Node.js 서버 만들기)  (0) 2022.06.30
'Stack/React' 카테고리의 다른 글
  • [React] 파일 업로드 관리하기
  • [React] 상태관리(useState / useReducer) 복습
  • [React] Lamp 쇼핑몰 구현하기 4 (Sqlite 연동)
  • [React] Lamp 쇼핑몰 구현하기 3 (서버에 연결하기)
7ingout
7ingout
  • 7ingout
    Hello, 7ingout world!
    7ingout
  • 전체
    오늘
    어제
    • 분류 전체보기 (205)
      • Project (5)
      • Stack (173)
        • React (40)
        • JavaScript (50)
        • TypeScript (14)
        • HTML (11)
        • CSS (31)
        • Spring (9)
        • PHP (15)
        • SQL (3)
        • Python (0)
      • ETC (9)
      • Design (13)
        • Illustrator (6)
        • Photoshop (7)
      • Articloid (4)
        • 7ingout (4)
  • 공지사항

    • ☻
  • 인기 글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.0
7ingout
[React] npm start 오류(throw err;) 해결하기
상단으로

티스토리툴바