안녕하세요. 좋은 강의 감사드립니다.
에러를 해결하지 못하여 질문드립니다.
webpack.config.js에 babel-loader를 추가 한 후, 빌드 시 에러가 발생합니다.
에러 메세지 입니다.
Error: [BABEL] /Users/duwon/front_edu/bundler_tutorial/app.js: Could not find plugin "proposal-class-static-block". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/preset-env/lib/index.js
[./app.js] 2.88 KiB {main} [built] [failed] [1 error]
ERROR in ./app.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
Error: [BABEL] /Users/duwon/front_edu/bundler_tutorial/app.js: Could not find plugin "proposal-class-static-block". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/preset-env/lib/index.js")
at getPlugin (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/preset-env/lib/index.js:67:11)
at /Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/preset-env/lib/index.js:258:62
at Array.map (<anonymous>)
at /Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/preset-env/lib/index.js:258:43
at /Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/helper-plugin-utils/lib/index.js:22:12
at /Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/config/full.js:199:14
at Generator.next (<anonymous>)
at Function.<anonymous> (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/gensync-utils/async.js:26:3)
at Generator.next (<anonymous>)
at step (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:261:32)
at evaluateAsync (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:291:5)
at Function.errback (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:113:7)
at errback (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/gensync-utils/async.js:70:18)
at async (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:188:31)
at onFirstPause (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:216:13)
at Generator.next (<anonymous>)
at cachedFunction (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/config/caching.js:68:46)
at cachedFunction.next (<anonymous>)
at loadPresetDescriptor (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/config/full.js:292:44)
at loadPresetDescriptor.next (<anonymous>)
at recurseDescriptors (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/config/full.js:107:30)
at recurseDescriptors.next (<anonymous>)
at loadFullConfig (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/config/full.js:142:6)
at loadFullConfig.next (<anonymous>)
at Function.transform (/Users/duwon/front_edu/bundler_tutorial/node_modules/@babel/core/lib/transform.js:25:45)
at transform.next (<anonymous>)
at step (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:269:25)
at /Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:273:13
at async.call.result.err.err (/Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:223:11)
at /Users/duwon/front_edu/bundler_tutorial/node_modules/gensync/index.js:189:28
감사합니다.
2021. 10. 19. 21:57
npm 대신 yarn으로 패키지 관리를 하시나 보네요. 해결하셔서 다행입니다. 👍