You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in ./node_modules/midtrans-client/lib/httpClient.js 9:18-40 Module not found: Error: Can't resolve 'querystring' in 'C:\Users\[Username]\Documents\[Project-name]\node_modules\midtrans-client\lib'
#55
Closed
DafiRamadhan opened this issue
Feb 21, 2023
· 1 comment
Halo. Saya ingin bertanya. Saya mengerjakan projek react.js dan ingin menggunakan library ini. Saya menginstallnya dengan menggunakan npm install midtrans-nodejs-client. Tetapi setelah itu, saat saya mencoba memanggilnya menggunakan const midtransClient = require('midtrans-client'); muncul pesan error berikut :
ERROR in ./node_modules/midtrans-client/lib/httpClient.js 9:18-40
Module not found: Error: Can't resolve 'querystring' in 'C:\Users[Username]\Documents[Project-name]\node_modules\midtrans-client\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: { "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 }
Saya mohon bantuannya. Terimakasih
The text was updated successfully, but these errors were encountered:
Halo. Saya ingin bertanya. Saya mengerjakan projek react.js dan ingin menggunakan library ini. Saya menginstallnya dengan menggunakan npm install midtrans-nodejs-client. Tetapi setelah itu, saat saya mencoba memanggilnya menggunakan const midtransClient = require('midtrans-client'); muncul pesan error berikut :
ERROR in ./node_modules/midtrans-client/lib/httpClient.js 9:18-40
Module not found: Error: Can't resolve 'querystring' in 'C:\Users[Username]\Documents[Project-name]\node_modules\midtrans-client\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: { "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 }
Saya mohon bantuannya. Terimakasih
The text was updated successfully, but these errors were encountered: