Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shawnpringle opened this issue Oct 5, 2019 · 1 comment

Comments

@shawnpringle
Copy link

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

@wehmoen
Copy link

wehmoen commented Nov 12, 2019

The npm package is called steem. Not steem-js: https://www.npmjs.com/package/steem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants