인프런 커뮤니티 질문&답변

minju kim님의 프로필 이미지
minju kim

작성한 질문수

따라하며 배우는 노드, 리액트 시리즈 - 유튜브 사이트 만들기

비디오 업로드 FORM 만들기 (1)

npm run dev

작성

·

368

0

npm run dev 부분에서 계속 충돌이 되는데 구글링을 해도 해결이 안됩니다 다양한 방법을 썼는데도 안되는데 뭐가 문제인가요?ㅠㅠㅠ

npm ERR! code ENOENT

npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\USER\Desktop\another\유투브프로그램\package.json'

npm ERR! enoent This is related to npm not being able to find a file.

npm ERR! enoent

npm ERR! A complete log of this run can be found in:

npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2021-03-09T06_57_55_182Z-debug.log

PS C:\Users\USER\Desktop\another\유투브프로그램> cd C:\Users\USER\Desktop\another\유투

브프로그램\boilerplate-mern-stack-master

PS C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master> npm run dev

> react-boiler-plate@1.0.0 dev C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master

> concurrently "npm run backend" "npm run start --prefix client"

[1] npm ERR! code ENOENT

[1] npm ERR! syscall open

[1] npm ERR! path C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\client\package.json

[1] npm ERR! errno -4058

[1] npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\client\package.json'

[1] npm ERR! enoent This is related to npm not being able to find a file.

[1] npm ERR! enoent

[1]

[1] npm ERR! A complete log of this run can be found in:

[1] npm ERR!     C:\Users\USER\AppData\Roaming\npm-cache\_logs\2021-03-09T07_01_35_362Z-debug.log

[0]

[0] > react-boiler-plate@1.0.0 backend C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master

[0] > nodemon server/index.js

[0]

[1] npm run start --prefix client exited with code 4294963238

[0] [nodemon] 1.19.4

[0] [nodemon] to restart at any time, enter `rs`

[0] [nodemon] watching dir(s): *.*

[0] [nodemon] watching extensions: js,mjs,json

[0] [nodemon] starting `node server/index.js`

[0] internal/modules/cjs/loader.js:883

[0]   throw err;

[0]   ^

[0]

[0] Error: Cannot find module 'bcrypt'

[0] Require stack:

[0] - C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\server\models\User.js

[0] - C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\server\routes\users.js

[0] - C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\server\index.js

[0]     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)   

[0]     at Function.Module._load (internal/modules/cjs/loader.js:725:27)

[0]     at Module.require (internal/modules/cjs/loader.js:952:19)

[0]     at require (internal/modules/cjs/helpers.js:88:18)

[0]     at Object.<anonymous> (C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\server\models\User.js:2:16)

[0]     at Module._compile (internal/modules/cjs/loader.js:1063:30)

[0]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)     

[0]     at Module.load (internal/modules/cjs/loader.js:928:32)

[0]     at Function.Module._load (internal/modules/cjs/loader.js:769:14)

[0]     at Module.require (internal/modules/cjs/loader.js:952:19)

[0]     at require (internal/modules/cjs/helpers.js:88:18)

[0]     at Object.<anonymous> (C:\Users\USER\Desktop\another\유투브프로그램\boilerplate-mern-stack-master\server\routes\users.js:3:18)

[0]     at Module._compile (internal/modules/cjs/loader.js:1063:30)

[0]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)     

[0]     at Module.load (internal/modules/cjs/loader.js:928:32)

[0]     at Function.Module._load (internal/modules/cjs/loader.js:769:14) {

[0]   code: 'MODULE_NOT_FOUND',

[0]   requireStack: [

[0]     'C:\\Users\\USER\\Desktop\\another\\유투브프로그램\\boilerplate-mern-stack-master\\server\\models\\User.js',

[0]     'C:\\Users\\USER\\Desktop\\another\\유투브프로그램\\boilerplate-mern-stack-master\\server\\routes\\users.js',

[0]     'C:\\Users\\USER\\Desktop\\another\\유투브프로그램\\boilerplate-mern-stack-master\\server\\index.js'

[0]   ]

[0] }

[0] [nodemon] app crashed - waiting for file changes before starting...

답변 1

0

John Ahn님의 프로필 이미지
John Ahn
지식공유자

안녕하세요  

 아마 bcrypt 오류 일수도 있는데 

npm install bcryptjs --save  명령어로   bcrypt를 대체할 수 있는 bcryptjs 를 설치 합니다. 

그리고  const bcrypt = require('bcrypt); 이렇게 된 부분을 

const bcrypt = require('bcryptjs'); 이렇게 바꿔주세요 ~ 

minju kim님의 프로필 이미지
minju kim

작성한 질문수

질문하기