23.11.14 16:53 작성
·
517
0
PS C:\Users\Desktop\boilerplate-mern-stack> yarn dev
yarn run v1.22.19
$ concurrently "npm run backend" "npm run start --prefix client"
[1]
[1] > client@0.1.0 start
[1] > react-scripts start
[1]
[0]
[0] > react-boiler-plate@1.0.0 backend
[0] > nodemon server/index.js
[0]
[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] Server Listening on 5000
[0] MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` or `mongoose.createConnection()` is a string.
[0] at Connection.openUri (C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\connection.js:694:11)
[0] at C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\index.js:351:10
[0] at C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5
[0] at new Promise (<anonymous>)
[0] at promiseOrCallback (C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10)
[0] at Mongoose._promiseOrCallback (C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\index.js:1149:10)
[0] at Mongoose.connect (C:\Users\Desktop\boilerplate-mern-stack\node_modules\mongoose\lib\index.js:350:20)
[0] at Object.<anonymous> (C:\Users\Desktop\boilerplate-mern-stack\server\index.js:19:4)
[0] at Module._compile (node:internal/modules/cjs/loader:1233:14)
[0] at Module._extensions..js (node:internal/modules/cjs/loader:1287:10)
[0] at Module.load (node:internal/modules/cjs/loader:1091:32)
[0] at Module._load (node:internal/modules/cjs/loader:938:12)
[0] at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
[0] at node:internal/main/run_main_module:23:47
[1] [HPM] Proxy created: / -> http://localhost:5000
[1] i 「wds」: Project is running at http://192.999.111.116/
[1] i 「wds」: webpack output is served from
[1] i 「wds」: Content not from webpack is served from C:\Users\Desktop\boilerplate-mern-stack\client\public
[1] i 「wds」: 404s will fallback to /
[1] Starting the development server...
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:69:19)
[1] at Object.createHash (node:crypto:138:10)
[1] at module.exports (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1] at NormalModule._initBuildHash (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1] at handleParseError (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:471:10)
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:503:5
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:358:12
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:373:3
[1] at iterateNormalLoaders (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
[1] at iterateNormalLoaders (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
[1] C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\react-scripts\scripts\start.js:19
[1] throw err;
[1] ^
[1]
[1] Error: error:0308010C:digital envelope routines::unsupported
[1] at new Hash (node:internal/crypto/hash:69:19)
[1] at Object.createHash (node:crypto:138:10)
[1] at module.exports (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\util\createHash.js:135:53)
[1] at NormalModule._initBuildHash (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:417:16)
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:452:10
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\webpack\lib\NormalModule.js:323:13
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:367:11
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:233:18
[1] at context.callback (C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
[1] at C:\Users\Desktop\boilerplate-mern-stack\client\node_modules\react-scripts\node_modules\babel-loader\lib\index.js:59:103 {
[1] opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
[1] library: 'digital envelope routines',
[1] reason: 'unsupported',
[1] code: 'ERR_OSSL_EVP_UNSUPPORTED'
[1] }
[1]
[1] Node.js v20.5.1
[1] npm run start --prefix client exited with code 1
반나절 넘게 이 오류만 붙잡고 있었는데 해결이 안되네요...
연결이 재설정되었습니다.
다음 방법을 시도해 보세요.
연결 확인
Windows 네트워크 진단 프로그램 실행
브라우저에서 위와 같이 뜨는데 이유가 뭘까요....
답변 1
0
안녕하세요 hannah 님, 인프런 AI 인턴이에요.
오류가 발생하고 있는 상황 같아서 정말 죄송합니다.
제공해주신 오류 메시지를 보면 MongooseError와 webpack 에러가 포함되어 있습니다. 가장 먼저 확인해야 할 부분은 MongooseError인데, 해당 오류는 uri
매개변수가 문자열이 아닌 “undefined”라는 값으로 전달되었기 때문에 발생한 것 같습니다. mongoose.connect()
또는 mongoose.createConnection()
의 첫 번째 매개변수가 문자열인지 확인해보세요.
또한, webpack 에러 역시 프로젝트의 구성 및 의존성에 관련된 오류로 보입니다. ESLint, Babel 또는 webpack 설정 등이 올바르게 구성되어 있는지 확인해보세요.
만약 이 여러 가지 방법을 시도했음에도 문제가 해결되지 않는다면, 추가적인 정보를 제공해주시면 더 정확한 도움을 드릴 수 있을 것입니다. 감사합니다!