Skip to content

Space SDK fails on import #70

@jordanlesich

Description

@jordanlesich

Steps to reproduce:
import {Users} from '@spacehq/sdk'

Import this into a create-react-app.

It will fail with this message:

`
uncaught TypeError: TextDecoder is not a constructor
at Object../node_modules/multibase/src/util.js (util.js:6)
at webpack_require (bootstrap:856)
at fn (bootstrap:150)
at Object../node_modules/multibase/src/base.js (base.js:3)
at webpack_require (bootstrap:856)
at fn (bootstrap:150)
at Object../node_modules/multibase/src/constants.js (constants.js:4)
at webpack_require (bootstrap:856)
at fn (bootstrap:150)
at Object../node_modules/multibase/src/index.js (index.js:7)
at webpack_require (bootstrap:856)
at fn (bootstrap:150)
at Object. (fsUtils.ts:2)
at Object../node_modules/@spacehq/storage/dist/utils/fsUtils.js (fs)

`

I tried adding 'web-encoding' to my node-modules, but it didn't make a difference.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions