React/React
[React] Module not found 오류 해결방법
지구젤리귀여워
2024. 2. 8. 08:19
728x90
프로젝트 개발 도중 갑자기 이런 에러가 떳다
?????
Compiled with problems:<button style="white-space:pre-wrap;background:#000000;font-size:20px;font-weight:bold;color:white;cursor:pointer;float:right;border:initial none initial">X</button>
ERROR in ./node_modules/body-parser/lib/types/urlencoded.js 217:12-34
Module not found: Error: Can't resolve 'querystring' in '~~~\client\node_modules\body-parser\lib\types' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "querystring": require.resolve("querystring-es3") }' - install 'querystring-es3' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "querystring": false }
ERROR in ./node_modules/content-disposition/index.js 19:15-39
Module not found: Error: Can't resolve 'path' in '~~~\client\node_modules\content-disposition' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }' - install 'path-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "path": false }
ERROR in ./node_modules/cookie-signature/index.js 4:13-30
Module not found: Error: Can't resolve 'crypto' in '~~~\node_modules\cookie-signature' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }' - install 'crypto-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "crypto": false }
ERROR in ./node_modules/destroy/index.js 12:17-41
Module not found: Error: Can't resolve 'fs' in '~~~\client\node_modules\destroy'
ERROR in ./node_modules/destroy/index.js 14:13-30
Module not found: Error: Can't resolve 'stream' in '~~~\client\node_modules\destroy' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "stream": require.resolve("stream-browserify") }' - install 'stream-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "stream": false }
ERROR in ./node_modules/etag/index.js 18:13-30
Module not found: Error: Can't resolve 'crypto' in '~~~\client\node_modules\etag' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }' - install 'crypto-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "crypto": false }
ERROR in ./node_modules/etag/index.js 20:12-31
Module not found: Error: Can't resolve 'fs' in '~~~\client\node_modules\etag'
ERROR in ./node_modules/express/lib/application.js 28:11-26
Module not found: Error: Can't resolve 'http' in '~~~\client\node_modules\express\lib' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false }
ERROR in ./node_modules/express/lib/application.js 42:14-37
Module not found: Error: Can't resolve 'path' in '~~~\client\node_modules\express\lib' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }' - install 'path-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "path": false }
ERROR in ./node_modules/express/lib/request.js 18:11-30
Module not found: Error: Can't resolve 'net' in '~~~\client\node_modules\express\lib'
ERROR in ./node_modules/express/lib/request.js 22:11-26
Module not found: Error: Can't resolve 'http' in '~~~\client\node_modules\express\lib' BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default. This is no longer the case. Verify if you need this module and configure a polyfill for it. If you want to include a polyfill, you need to: - add a fallback 'resolve.fallback: { "http": require.resolve("stream-http") }' - install 'stream-http' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "http": false }
이런식의 에러가 마구마구 떠버리는데
프로젝트를 진행하다가 갑자기 떠서 갑자기 정신이 흔들렸는데 검색해보니
import { CURSOR } from 'oracledb';
이런 import 를 잘못해서 그런것...
CSS 중 cursor:pointer 를 넣다가 엉겁결에 넣어진건데 이것때문에 짧지만 시간을 낭비했다 ㅡ.ㅡ..
솔직히 킹받네 후..