안녕하세요
klaytn_address로 caver-js를 이용하여 balance구하려고 하는중에 caver-js 모듈을 깔면 아래와같이 에러메세지가 쭉 뜨더라구요…
그래서 에러에 해당하는 모듈들(install ‘stream-http’, install ‘https-browserify’, install ‘url’, install ‘crypto-browserify’, install ‘stream-browserify’, )을 설치했더니 그래도 계속 같은 에러가 떠서 문의를 남깁니다. ㅠㅠ
ERROR in ./node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js 31:13-28
Module not found: Error: Can’t resolve ‘http’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src’
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/caver-js/packages/caver-core-requestmanager/caver-providers-http/src/index.js 33:14-30
Module not found: Error: Can’t resolve ‘https’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-http/src’
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: { “https”: require.resolve(“https-browserify”) }’
- install ‘https-browserify’
If you don’t want to include a polyfill, you can use an empty module like this:
resolve.fallback: { “https”: false }
ERROR in ./node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-ws/src/helpers.js 14:14-28
Module not found: Error: Can’t resolve ‘url’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-core-requestmanager/caver-providers-ws/src’
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: { “url”: require.resolve(“url/”) }’
- install ‘url’
If you don’t want to include a polyfill, you can use an empty module like this:
resolve.fallback: { “url”: false }
ERROR in ./node_modules/caver-js/packages/caver-klay/caver-klay-accounts/src/index.js 42:76-93
Module not found: Error: Can’t resolve ‘crypto’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-klay/caver-klay-accounts/src’
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/caver-js/packages/caver-utils/randomhex/crypto.js 18:0-34
Module not found: Error: Can’t resolve ‘crypto’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-utils/randomhex’
Did you mean ‘./crypto’?
Requests that should resolve in the current directory need to start with ‘./’.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, /Users/imhyeonjeong/Desktop/blockchain/node_modules).
If changing the source code is not an option there is also a resolve options called ‘preferRelative’ which tries to resolve these kind of requests in the current directory too.
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/caver-js/packages/caver-wallet/src/keyring/keyringHelper.js 24:76-93
Module not found: Error: Can’t resolve ‘crypto’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/caver-js/packages/caver-wallet/src/keyring’
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/cipher-base/index.js 3:16-43
Module not found: Error: Can’t resolve ‘stream’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/cipher-base’
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/eth-lib/lib/bytes.js 7:193-227
Module not found: Error: Can’t resolve ‘crypto’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/eth-lib/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: { “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/xhr2-cookies/dist/xml-http-request.js 37:11-26
Module not found: Error: Can’t resolve ‘http’ in ‘/Users/imhyeonjeong/Desktop/blockchain/node_modules/xhr2-cookies/dist’
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 }