Issue found when installing 'request' package
See original GitHub issueI installed require npm package on app, imported it in react module, and got this error:
Error in ./~/request/lib/har.js
Module not found: Error: Cannot resolve module 'fs' in D:\projects\date-range-picker\node_modules\request\lib
@ ./~/request/lib/har.js 3:9-22
Error in ./~/request/~/forever-agent/index.js
Module not found: Error: Cannot resolve module 'net' in D:\projects\date-range-picker\node_modules\request\node_modules\forever-agent
@ ./~/request/~/forever-agent/index.js 6:10-24
Error in ./~/request/~/forever-agent/index.js
Module not found: Error: Cannot resolve module 'tls' in D:\projects\date-range-picker\node_modules\request\node_modules\forever-agent
@ ./~/request/~/forever-agent/index.js 7:10-24
Error in ./~/request/~/tough-cookie/lib/cookie.js
Module not found: Error: Cannot resolve module 'net' in D:\projects\date-range-picker\node_modules\request\node_modules\tough-cookie\lib
@ ./~/request/~/tough-cookie/lib/cookie.js 32:10-24
Error in ./~/request/~/tunnel-agent/index.js
Module not found: Error: Cannot resolve module 'net' in D:\projects\date-range-picker\node_modules\request\node_modules\tunnel-agent
@ ./~/request/~/tunnel-agent/index.js 3:10-24
Error in ./~/request/~/tunnel-agent/index.js
Module not found: Error: Cannot resolve module 'tls' in D:\projects\date-range-picker\node_modules\request\node_modules\tunnel-agent
@ ./~/request/~/tunnel-agent/index.js 4:10-24
Is a very similar issue to what’s described here: https://github.com/request/request/issues/1691
In the issue above is indicated to tweak the webpack.config.js file to cater for those elements that are being called.
Is there any known workaround for this?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How to PIP Install Requests Python Package - ActiveState
Pip install Requests into a Virtual Directory You can use pip to install a specific version of the Requests module into a Virtualenv ......
Read more >Python error when attempting to install 'request' package ...
I'm getting the below error message when attempting to install 'request' Python package running command pip install request :.
Read more >Installation of Requests — Requests 2.28.1 documentation
This part of the documentation covers the installation of Requests. The first step to using any software package is getting it properly installed....
Read more >Use of the REQUEST_INSTALL_PACKAGES permission
The REQUEST_INSTALL_PACKAGES permission only takes effect when your app targets Android API level 26 or later on devices running Android 8 or later....
Read more >How to Install Requests Library in Python | - Agira Technologies
How to Install Requests Library in Python · 1.Verify Python Installation · 2. Access to Python Over Terminal · 3. Import Requests Library...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Verified that this fixes the problem in your repo:
You don’t need to. Why did you do this?
We don’t treat URLs starting with
/api
in any special way. We just prepend the proxy URL to the URL you pass tofetch()
.So it tried to load
https://holidayapi.com/v1/api/holidays
because that’s what you get by concatenatinghttps://holidayapi.com/v1
and/api/holidays
. You probably meantfetch('/holidays')
instead.