Prerequisites
Before installing the Axion SDK, ensure you have the following:Node.js
Node.js version 14.0 or higher
Package Manager
npm, yarn, or pnpm installed
Install the Package
Choose your preferred package manager to install the Axion SDK:Dependencies
The Axion SDK has minimal dependencies for a lightweight installation:- axios (^1.0.0) - HTTP client for making API requests
Verify Installation
After installation, verify that the SDK is properly installed by importing it in your project:TypeScript Support
The Axion SDK is built with TypeScript and includes type definitions out of the box. No additional @types packages are needed.The SDK exports TypeScript declaration files (*.d.ts) automatically, providing full IntelliSense and type checking in your IDE.
TypeScript Configuration
Ensure yourtsconfig.json is configured to support the SDK:
tsconfig.json
Package Information
Here are the key details about the Axion SDK package:@axionquant/sdk
1.1.2
MIT
Development Dependencies
If you’re contributing to the SDK or need to build from source, you’ll also need:- @types/node (^20.0.0) - Node.js type definitions
- typescript (^5.0.0) - TypeScript compiler
Build from Source
Troubleshooting
Module not found error
Module not found error
If you encounter a “Cannot find module ‘@axionquant/sdk’” error:
- Ensure the package is installed in your
node_modulesdirectory - Check that your
package.jsonlists the dependency - Try deleting
node_modulesand reinstalling:
TypeScript errors
TypeScript errors
If you’re seeing TypeScript compilation errors:
- Verify your TypeScript version is 5.0 or higher:
tsc --version - Ensure
esModuleInteropis enabled in yourtsconfig.json - Try updating the SDK to the latest version
Axios version conflicts
Axios version conflicts
If you have axios version conflicts with other packages:
- Check your
package.jsonfor duplicate axios versions - Use npm’s peer dependency resolution or yarn’s resolutions field
- Consider using npm 7+ which handles peer dependencies automatically