Joon-na-Seriously / Joon-na-Seriously/seungjohan-node-react-basic

modules 를 못찾는다는 Error가 계속 뜹니다.

Open
#1 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

modules 를 못찾는다는 Error가 계속 뜹니다.
그래서 프론트랑 연결해서 체크해보려고 해도 되지가 않습니다.
models/User

user 잘 import되는지 코드랑으로 전부 확인해봤는데 잘안되네요


boilder-plate@1.0.0 backend /Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate
nodemon server/index.js

[nodemon] 2.0.12
[nodemon] to restart at any time, enter rs
[nodemon] watching path(s): .
[nodemon] watching extensions: js,mjs,json
[nodemon] starting node server/index.js
internal/modules/cjs/loader.js:905
throw err;
^

Error: Cannot find module './models/User'
Require stack:

  • /Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/middleware/auth.js
  • /Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/index.js
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
    at Function.Module._load (internal/modules/cjs/loader.js:746:27)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object. (/Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/middleware/auth.js:1:18)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:92:18)
    at Object. (/Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/index.js:14:18)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:14) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/middleware/auth.js',
    '/Users/seungjohan/PycharmProjects/nodereact-basic/boilder-plate/server/index.js'
    ]
    }
    [nodemon] app crashed - waiting for file changes before starting...

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in server/middleware/auth.js at the require for ./models/User, then check the referenced models/User path and server/index.js entry point. Run the shown npm start command with nodemon and confirm the backend starts without MODULE_NOT_FOUND before checking the frontend connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.