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 |