해결된 질문
작성
·
370
0
PS C:\boiler-plate> npm run dev
> boiler-plate@1.0.0 dev
> concurrently "npm run backend" "npm run start --prefix client"
[0]
[0] > boiler-plate@1.0.0 backend
[0] > nodemon server/index.js
[0]
[1]
[1] > client@0.1.0 start
[1] > node server/index.js
[1]
[1] node:internal/modules/cjs/loader:1042
[1] throw err;
[1] ^
[1]
[1] Error: Cannot find module 'C:\boiler-plate\client\server\index.js'
[1] at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
[1] at Module._load (node:internal/modules/cjs/loader:885:27)
[1] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
[1] at node:internal/main/run_main_module:23:47 {
[1] code: 'MODULE_NOT_FOUND',
[1] requireStack: []
[1] }
[1]
[1] Node.js v18.13.0
[1] npm run start --prefix client exited with code 1
[0] [nodemon] 3.0.1
[0] [nodemon] to restart at any time, enter rs
[0] [nodemon] watching path(s): .
[0] [nodemon] watching extensions: js,mjs,cjs,json
[0] [nodemon] starting node server/index.js
[0] node:internal/modules/cjs/loader:1042
[0] throw err;
[0] ^
[0]
[0] Error: Cannot find module '../models/User'
[0] Require stack:
[0] - C:\boiler-plate\auth.js
[0] - C:\boiler-plate\server\index.js
[0] at Module._resolveFilename (node:internal/modules/cjs/loader:1039:15)
[0] at Module._load (node:internal/modules/cjs/loader:885:27)
[0] at Module.require (node:internal/modules/cjs/loader:1105:19)
[0] at require (node:internal/modules/cjs/helpers:103:18)
[0] at Object.<anonymous> (C:\boiler-plate\auth.js:1:16)
[0] at Module._compile (node:internal/modules/cjs/loader:1218:14)
[0] at Module._extensions..js (node:internal/modules/cjs/loader:1272:10)
[0] at Module.load (node:internal/modules/cjs/loader:1081:32)
[0] at Module._load (node:internal/modules/cjs/loader:922:12)
[0] at Module.require (node:internal/modules/cjs/loader:1105:19) {
[0] code: 'MODULE_NOT_FOUND',
[0] requireStack: [ 'C:\\boiler-plate\\auth.js', 'C:\\boiler-plate\\server\\index.js' ]
[0] }
[0]
[0] Node.js v18.13.0
[0] [nodemon] app crashed - waiting for file changes before starting...
다 찾아보고 적용하는데 해결이 안되고 있습니다.
답변