Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

22.4 에서 index.js를 main.js로 변경한 이후 오류발생 #387

Open
songjihoonn opened this issue Jan 4, 2025 · 1 comment
Open

Comments

@songjihoonn
Copy link

22.3.2까지는 정상동작 확인하였습니다.

22.4 에서 index.js를 main.js로 변경한 이후

...
Error: Cannot find module 'node:http'
Require stack:

  • /Users/__ssong_g/React_practise/blog/blog-backend/node_modules/koa-router/lib/router.js
  • /Users/__ssong_g/React_practise/blog/blog-backend/src/main.js
  • /Users/__ssong_g/React_practise/blog/blog-backend/src/index.js
    at Object. (/Users/__ssong_g/React_practise/blog/blog-backend/node_modules/koa-router/lib/router.js:7:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/__ssong_g/React_practise/blog/blog-backend/node_modules/koa-router/lib/router.js',
    '/Users/__ssong_g/React_practise/blog/blog-backend/src/main.js',
    '/Users/__ssong_g/React_practise/blog/blog-backend/src/index.js'
    ]
    }

Node.js v20.16.0
[nodemon] app crashed - waiting for file changes before starting...

해당오류가 발생하며

22.4.1 끝까지 교재대로 코드수정을 해보아도
오류가 안 없어집니다..

오탈자 없고, 프로젝트 삭제후 새로 만들고 다시 코드 작성해봐도
동일한 오류가 발생하네요..

도움부탁드립니다.

@songjihoonn
Copy link
Author

#381 으로 버전확인도 하였습니다..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant