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

Can't resolve 'https' #828

Closed
Closed
@tech-somish

Description

@tech-somish

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions