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

kwonjiwoo님의 프로필 이미지
kwonjiwoo

작성한 질문수

Vue.js - Django 연동 웹 프로그래밍 (실전편)

build 오류

작성

·

397

0

섹션 11 vue.config.js 수정 후에 빌드를 하면 아래와 같이 에러가 뜹니다 ㅠㅠ 왜이럴까요.. ㅜㅜㅜㅜ

그리고 저는 강사님 수업에서는 안보이는 jsconfig.json 파일이 있는데 이건 지워도 되나요.. ㅜㅜ 너무 어렵네요

C:\VueDjango\frontend>npm run build

> frontend@0.1.0 build
> vue-cli-service build


/  Building for production...Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\VueDjango\frontend\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\VueDjango\frontend\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\VueDjango\frontend\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\VueDjango\frontend\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:236:3
    at runSyncOrAsync (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:130:11)
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
    at Array.<anonymous> (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:205:4)
    at Storage.finished (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:55:16)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:91:9
    at C:\VueDjango\frontend\node_modules\graceful-fs\graceful-fs.js:123:16
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3)
\  Building for production...C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:114
                        throw e;
                        ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\util\createHash.js:90:53)
    at NormalModule._initBuildHash (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:401:16)
    at handleParseError (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:449:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:481:5
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\webpack\lib\NormalModule.js:342:12
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:186:6
    at context.callback (C:\VueDjango\frontend\node_modules\@vue\cli-service\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at Object.callback (C:\VueDjango\frontend\node_modules\thread-loader\dist\index.js:59:5)
    at done (C:\VueDjango\frontend\node_modules\neo-async\async.js:8069:18)
    at callback (C:\VueDjango\frontend\node_modules\thread-loader\dist\WorkerPool.js:187:19)
    at C:\VueDjango\frontend\node_modules\thread-loader\dist\WorkerPool.js:223:13
    at done (C:\VueDjango\frontend\node_modules\neo-async\async.js:3667:9)
    at Socket.onChunk (C:\VueDjango\frontend\node_modules\thread-loader\dist\readBuffer.js:40:9)
    at Socket.emit (node:events:514:28)
    at Readable.read (node:internal/streams/readable:539:10)
    at Socket.read (node:net:750:39)
    at flow (node:internal/streams/readable:1023:34)
    at emitReadable_ (node:internal/streams/readable:604:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:81:21) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.17.1

답변 2

0

김석훈님의 프로필 이미지
김석훈
지식공유자

독자님.

강의에 제공된 소스 중에서, VueDjangoVite 프로젝트를 사용하고 있는 거 맞나요 ?

이 프로젝트는 Vuetify 3 버전으로 프로젝트를 생성해야 합니다. 맞는지요 ?

kwonjiwoo님의 프로필 이미지
kwonjiwoo
질문자

아 아니요 제가 지금 소스를 확인했습니다 ㅠㅠ!! 바보같이..

그럼 혹시 섹션11 에 올려주신 영상 그대로 따라하려면 vuetify2 사용 해도 되는 건가요? 제가 vue를 5.x.x 설치했었어서 영상이랑 맞지 않았던 것 같습니다. 영상은 Vue 4.x.x vuetify2 이고 따로 올려주신 소스만 vue5,vuetify3 인건가요?

영상에서 진행해주시는 것 그대로 따라가는 게 수월할 것 같아서요.

김석훈님의 프로필 이미지
김석훈
지식공유자

독자님. 섹션 10 에 소스에 대한 버전 설명이 있습니다.

VueDjangoWebpack2 소스가 섹션 11 을 반영한 소스 입니다.

0

김석훈님의 프로필 이미지
김석훈
지식공유자

안녕하세요.

jsconfig.json 파일은, 빌드 과정에서 자동으로 생성된 파일이니 지우지 마세요.

ERR_OSSL_EVP_UNSUPPORTED 에러는, 아래처럼 package.json 파일 수정 바랍니다.

( 구글링해서, https://points.tistory.com/122 이 페이지 참고했어요. )

{
  ...
  "scripts": {
    "dev": "set NODE_OPTIONS=--openssl-legacy-provider && vite",
    "build": "set NODE_OPTIONS=--openssl-legacy-provider && vite build",
    "preview": "vite preview"
  },
kwonjiwoo님의 프로필 이미지
kwonjiwoo
질문자

감사합니다 강사님, 말씀해주신대로 진행해보았는데,

> frontend@0.1.0 build > set NODE_OPTIONS=--openssl-legacy-provider && vite build 'vite'은(는) 내부 또는 외부 명령, 실행할 수 있는 프로그램, 또는 배치 파일이 아닙니다.

이런 오류가 떠서 vite 를 설치한 후 다시 빌드를 해보았더니

vite v4.4.11 building for production... ✓ 0 modules transformed. ✓ built in 23ms Could not resolve entry module "index.html". error during build: RollupError: Could not resolve entry module "index.html". at error (file:///C:/VueDjango/frontend/node_modules/rollup/dist/es/shared/node-entry.js:2287:30) at ModuleLoader.loadEntryModule (file:///C:/VueDjango/frontend/node_modules/rollup/dist/es/shared/node-entry.js:24881:20) at async Promise.all (index 0)

이런 오류가 뜹니다 ㅠㅠ 그리고 vue.config.js 에 const { defineConfig } = require('vue/cli-service'); 같은 defineConfig 추가 안해도 될까요? 강사님 코드에는 없는데 제 파일에는 원래 있던 내용이라서요, ㅠㅠ

kwonjiwoo님의 프로필 이미지
kwonjiwoo

작성한 질문수

질문하기