Installation

This guide covers all the ways to install and configure My Project.

Requirements

  • Node.js 18 or higher
  • npm 9 or higher (or yarn/pnpm)

Package Managers

npm

npm install my-project

yarn

yarn add my-project

pnpm

pnpm add my-project

Configuration

Create a myproject.config.js file in your project root:

export default {
  // Source directory
  input: './src',

  // Output directory
  output: './dist',

  // Enable debug mode
  debug: false,

  // Plugin configuration
  plugins: [],
};

Environment Variables

You can also configure via environment variables:

Variable Description Default
MP_INPUT Source directory ./src
MP_OUTPUT Output directory ./dist
MP_DEBUG Debug mode false

Verifying Installation

After installation, verify it works:

npx my-project --version

You should see the version number printed to the console.

Troubleshooting

Common Issues

Permission errors on macOS/Linux:

sudo npm install -g my-project

Node.js version mismatch:

nvm install 20
nvm use 20

Cache issues:

npm cache clean --force
npm install