Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Can't resolve 'https' #828

Closed
tech-somish opened this issue Aug 10, 2018 · 2 comments · Fixed by #915
Closed

Can't resolve 'https' #828

tech-somish opened this issue Aug 10, 2018 · 2 comments · Fixed by #915

Comments

@tech-somish
Copy link

I have included the latest version of ipfs-api in an angular project of mine but when building the project with ng serve, I am getting this error

ERROR in ./node_modules/ipfs-api/src/utils/request.js Module not found: Error: Can't resolve 'https' in 'D:\-\node_modules\ipfs-api\src\utils'

The error is generated by this line
const httpsRequest = require('https').request

if i change the https to http, it works. Node is not able to resolve https. I have https module installed for my project though.

when snooping around ipfs-api's package.json, I found that the below line is declared in browser
"http": "stream-http",

but there is nothing for https. I am not sure but i suspect that this is the reason that the error is popping up.

@ashah917
Copy link

I will take this one

@alanshaw
Copy link
Contributor

ping @ashah917 - did you get a chance to look at this yet?

@ghost ghost removed the ready label Mar 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants