Installation
Install MoroJS and set up your development environment. Once installed, you'll be ready to build your first API.
What You'll Learn
- How to verify your system requirements
- Install MoroJS using your preferred package manager
- Set up your project for ESM (ES Modules)
- Configure TypeScript for optimal development
Check Prerequisites
Before installing MoroJS, ensure you have the following:
- Node.js 18.0.0 or higher
- npm, yarn, or pnpm package manager
- TypeScript knowledge (recommended)
💡 Tip: Check your Node.js version with node --version
Understand ESM Requirements
ESM-Only Framework
MoroJS is built exclusively for modern JavaScript and requires ESM (ES Modules). Your project must use "type": "module" in package.json.
If you're migrating from CommonJS, convert your imports/exports to ESM syntax.
Install MoroJS
Install MoroJS using your preferred package manager:
npm
bash
yarn
bash
pnpm
bash
✓ What this does: Installs MoroJS and its dependencies. The package includes everything you need to get started.
Configure Your Project
Ensure your package.json includes:
package.json
typescript
And your tsconfig.json has ESM support:
tsconfig.json
typescript
✨ Result: Your project is now configured for ESM and ready for MoroJS development.
Ready to Build!
Now that MoroJS is installed, let's build your first API. Our Quick Start guide will walk you through everything step-by-step.
Go to Quick Start GuideTroubleshooting
Common Issues
Node.js version issues
Ensure you're using Node.js 18 or higher. Check with node --version.
TypeScript compilation errors
Make sure your tsconfig.json has "moduleResolution": "NodeNext"and "esModuleInterop": true.
Import/export issues
Use ES modules syntax: import { createApp } from '@morojs/moro'instead of CommonJS require.