EOSIO / eosjs

General purpose library for the EOSIO blockchain.
http://eosio.github.io/eosjs
MIT License
1.43k stars 463 forks source link

README npm install instructions #366

Closed bhazzard closed 6 years ago

bhazzard commented 6 years ago

README should reference how to install the library.

Current guidance should be npm install eosjs@beta

betdiceone commented 6 years ago
Error: Cannot find module 'node-fetch' 

I've tried npm install node-fetch. But, another error was shown:

(node:2687) UnhandledPromiseRejectionWarning: Error: Invalid cast from type 'object_type' to string
    at new RpcError (/root/kkkk/node_modules/eosjs/dist/eosjs-rpcerror.js:22:28)
    at JsonRpc.<anonymous> (/root/kkkk/node_modules/eosjs/dist/eosjs-jsonrpc.js:117:35)
    at step (/root/kkkk/node_modules/eosjs/dist/eosjs-jsonrpc.js:35:23)
    at Object.next (/root/kkkk/node_modules/eosjs/dist/eosjs-jsonrpc.js:16:53)
    at fulfilled (/root/kkkk/node_modules/eosjs/dist/eosjs-jsonrpc.js:7:58)
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:2687) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:2687) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Any ideas?

I am running on Ubuntu 18.04. I've test it in Windows 10, it works fine.

jeffreyssmith2nd commented 6 years ago

@betdiceone Can you move this to a new issue specific to your problem? Thanks!

betdiceone commented 6 years ago

No problem.