Prerequisites
Before using Node Blueprint CLI, ensure you have the following installed on your system:Node.js (v18 or higher)
Node.js (v18 or higher)
Node Blueprint requires Node.js version 18 or higher. Check your version:If you need to install or update Node.js, download it from nodejs.org or use a version manager like nvm.
Package manager
Package manager
You’ll need one of the following package managers:
- npm (comes with Node.js)
- yarn (install with
npm install -g yarn) - pnpm (install with
npm install -g pnpm)
Git (optional)
Git (optional)
Git is recommended for version control. Node Blueprint can automatically initialize a git repository for your project.Download Git from git-scm.com if needed.
Database (optional)
Database (optional)
You can install your database later, but having it ready helps you test the generated project immediately:
- PostgreSQL: Download from postgresql.org
- MySQL: Download from mysql.com
- MongoDB: Download from mongodb.com
Installation methods
Node Blueprint CLI doesn’t require global installation. Use your preferred package manager’screate command to run it directly:
The
create command automatically downloads and executes the latest version of Node Blueprint CLI, so you always get the newest features without manual updates.Verify installation
To verify Node Blueprint CLI works correctly, run the command and check that the interactive prompts appear:Ctrl+C to exit if you’re just testing.
CLI options
While Node Blueprint works great in interactive mode, you can also pass options directly via command-line flags:Available flags
Project name (also creates a directory with this name)
Framework to use:
express or fastifyDatabase type:
postgres, mysql, or mongodbORM to use:
drizzle, prisma, or mongooseMongoDB projects automatically use Mongoose. For PostgreSQL and MySQL, you can choose between Drizzle and Prisma.
Authentication method:
jwt-auth or noneAdditional features to include:
dockerInitialize git repository (use
--no-git to skip)Install dependencies (use
--no-install to skip)Non-interactive example
Create a complete project without any prompts:Troubleshooting
Command not found
Command not found
If you see
command not found: create-node-blueprint, ensure:- You’re using the correct syntax:
npm create node-blueprint(notnpm install) - Your npm version is up to date:
npm install -g npm@latest - Your internet connection is active (the package downloads on demand)
Permission denied errors
Permission denied errors
Avoid using
sudo with npm. Instead:- Configure npm to use a directory in your home folder
- Follow npm’s official guide
- Or use a Node version manager like nvm
Package manager detection issues
Package manager detection issues
Node Blueprint auto-detects your package manager from the environment. If it selects the wrong one:
- The CLI uses whichever
createcommand you ran (npm,yarn, orpnpm) - You can manually edit
package.jsonscripts after generation - Delete
node_modulesand run your preferred package manager’s install command
TypeScript or ESM errors
TypeScript or ESM errors
If you encounter module resolution errors:
- Ensure your Node.js version is 18 or higher
- Check that
package.jsonincludes"type": "module" - Verify
tsconfig.jsonhas"module": "ESNext"and"moduleResolution": "node"
Next steps
Quickstart guide
Now that Node Blueprint CLI is installed, create your first project and learn the generated project structure.