Skip to content

steem-js cannot be imported into typescript project but can with js project... #455

@shawnpringle

Description

@shawnpringle

Expected behavior

'npm install steem --save' should result in being able to use it from both typescript or javascript.

Actual behavior

'npm install steem --save' doesn't even work.
'npm install https://github.com/steemit/steem-js -g --save' seems to work though until you actually run 'npm dev start' when it cannot find the steem object in SteemUserButton.js, however it can when it uses generic React without Typescript.

How to reproduce

Create a typescript skeleton add steem-js via npm as above and then add to App.tsx the following line:
import 'steem';

Then run 'npm start dev'. It fails with "Module not found: Can't resolve 'steem' in 'D:\Source\steemfiles-ts-react\src".

I am using Brave and the github version "https://github.com/steemit/steem-js".

Windows 10

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