Node
npm install @solana/web3.js@rc
Install full package
npm install @solana/web3.js
There 48 modules currently. You can see them all https://github.com/solana-labs/solana-web3.js/tree/master/packages.
Below is a list of the popular ones.
Fetch and decode accounts only
npm install @solana/accounts
Coders and Decoders only
npm install @solana/codecs
Error codes and messages
npm install @solana/errors
Working with Solana Keys only
npm install @solana/keys
RPC methods
npm install @solana/rpc
RPC subscriptions
npm install @solana/rpc-subscriptions
Signers for creating and signing messages and transactions
npm install @solana/signers
Working with System Variables
npm install @solana/sysvars
Working with Transactions and Messages only
npm install @solana/transaction-messages
Working with Transactions only
npm install @solana/transactions