question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Module not found: Error: Can't resolve 'http'

See original GitHub issue

Hi, thanks for your great job !

i don’t manage to use your library

I’m doing a node/angular/ionic 4 app with last version npm packages

i try u node.js example and i got :

[ng] ERROR in ./node_modules/rss-parser/lib/parser.js
[ng] Module not found: Error: Can't resolve 'http' in 'C:\Users\MyAccount\source\repos\just-s-app\node_modules\rss-parser\lib'
[ng] ERROR in ./node_modules/rss-parser/lib/parser.js
[ng] Module not found: Error: Can't resolve 'https' in 'C:\Users\MyAccount\source\repos\just-s-app\node_modules\rss-parser\lib'
[ng] i 「wdm」: Failed to compile.

i try modify the tsconfig.json

i try you web example :

file at « http://localhost:8100/node_modules/rss-parser/dist/rss-parser.min.js » was block because of incorrect type MIME (« text/html ») (X-Content-Type-Options: nosniff).

i try this method : https://www.techiediaries.com/rss-atom-reader-ionic-3/

all that without any result 😒 sorry i’m noob to Node.JS, and sorry for my english i’m french

thanks !

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:17 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
tofracommented, Apr 30, 2019

I found a solution for Angular/Ionic! Add this to package.json

  "browser": {
    "http": false,
    "https": false
  }

Run npm install stream timers --save

0reactions
sfbaker7commented, Jul 12, 2021

+1, seeing this issue as well in react/TS + yarn project. I am getting cannot resolve errors for http, https, and buffer. The above solution didn’t work for me. Any pointers or updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5: Module not found: Can't resolve 'http' #998 - GitHub
I hit this issue to when I upgraded my project from Webpack v4 to v5. The fix was to prepend browser to the...
Read more >
Module not found: Error: Can't resolve 'http' [Solved] | bobbyhadz
The error "Module not found: Error: Can't resolve 'http'" occurs because there has been a breaking change in Webpack version 5. To solve...
Read more >
How to fix 'Module not found: Can't resolve 'http' in ... - YouTube
Your browser can't play this video. ... How to fix ' Module not found : Can't resolve ' http ' in ...' error...
Read more >
Module not found: Error: Can't resolve 'http' in React
The http module is a nodejs module. On the React App, you can only use modules that leverage the browser's capabilities.
Read more >
Webpack 5 errors | ImmutableX Documentation
Module not found : Error: Can't resolve 'https' in ... stream-browserify assert stream-http https-browserify os-browserify url buffer process.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found