[REACT] Module not found:~~~Can't resolve '라이브러리' 오류 문의입니다.

22.04.19 23:12 작성 조회수 892

0

react에서 새로운 라이브러릴 다운받고 사용할때 자주 일어나는 오류로 알고있습니다..

 

구글링의 결과 삭제후 재설치를 대부분 권장하시길래,

기본적으로 package-lock.json과 node_modules폴더를 삭제 진행후 npm install 이후 실행하는 것을 몇번을 반복해도 아래와 같이 같은 결과가 나오네요ㅠㅠ 해결책을 아시는 분이 있다면,, 알려주시면 감사드리겠습니다..

 

Compiled with problems:<button style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-attachment:initial;background-origin:initial;background-clip:initial;font-size:20px;font-weight:bold;cursor:pointer;float:right;border:initial none initial">X</button>

ERROR in ./node_modules/fs.realpath/index.js 8:9-22

Module not found: Error: Can't resolve 'fs' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\fs.realpath'



ERROR in ./node_modules/fs.realpath/old.js 21:17-32

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\fs.realpath' 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/fs.realpath/old.js 25:9-22

Module not found: Error: Can't resolve 'fs' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\fs.realpath'



ERROR in ./node_modules/glob/common.js 13:9-22

Module not found: Error: Can't resolve 'fs' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob'



ERROR in ./node_modules/glob/common.js 15:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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/glob/glob.js 52:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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/glob/glob.js 54:13-30

Module not found: Error: Can't resolve 'assert' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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: { "assert": require.resolve("assert/") }' - install 'assert' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "assert": false }



ERROR in ./node_modules/glob/glob.js 67:11-26

Module not found: Error: Can't resolve 'util' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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: { "util": require.resolve("util/") }' - install 'util' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "util": false }



ERROR in ./node_modules/glob/sync.js 12:11-26

Module not found: Error: Can't resolve 'util' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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: { "util": require.resolve("util/") }' - install 'util' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "util": false }



ERROR in ./node_modules/glob/sync.js 14:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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/glob/sync.js 16:13-30

Module not found: Error: Can't resolve 'assert' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\glob' 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: { "assert": require.resolve("assert/") }' - install 'assert' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "assert": false }



ERROR in ./node_modules/node-sass/lib/extensions.js 4:10-27

Module not found: Error: Can't resolve 'os' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\node-sass\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: { "os": require.resolve("os-browserify/browser") }' - install 'os-browserify' If you don't want to include a polyfill, you can use an empty module like this: resolve.fallback: { "os": false }



ERROR in ./node_modules/node-sass/lib/extensions.js 5:9-22

Module not found: Error: Can't resolve 'fs' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\node-sass\lib'



ERROR in ./node_modules/node-sass/lib/extensions.js 6:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\node-sass\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/node-sass/lib/index.js 4:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\node-sass\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/true-case-path/index.js 5:11-26

Module not found: Error: Can't resolve 'path' in 'C:\Users\A\Videos\React class\shop1\shop1\node_modules\true-case-path' 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 }

 

-

 

 

답변 0

답변을 작성해보세요.

답변을 기다리고 있는 질문이에요.
첫번째 답변을 남겨보세요!