Prerequisites
Before you begin, ensure you have the following installed:- Node.js 18+ (LTS recommended)
- npm 9+
Installation
Install dependencies
Install all required npm packages:This will install all dependencies including:
- React 18.3.1
- Three.js for 3D rendering
- Manifold WASM CSG engine
- Vite build tool
- TypeScript compiler
Start the development server
Run the Vite development server:The server will start on port 5173 with hot module replacement enabled.
Development Features
The development server includes:- Hot Module Replacement (HMR) - Changes reflect instantly without full page reload
- TypeScript support - Full type checking and IntelliSense
- PWA dev mode - Service worker enabled in development
- File watching - Automatically rebuilds on file changes
Project Structure
Troubleshooting
Port 5173 already in use
Port 5173 already in use
If port 5173 is already occupied, Vite will automatically try the next available port (5174, 5175, etc.). Check the terminal output for the actual port.Alternatively, you can specify a different port:
WASM module fails to load
WASM module fails to load
The Manifold 3D WASM module may fail to load due to browser restrictions or CORS issues.Solution:
- Clear your browser cache
- Ensure you’re using a modern browser (Chrome, Edge, Firefox)
- Check the browser console for specific error messages
- Verify that
manifold-3dis properly installed innode_modules
TypeScript errors on install
TypeScript errors on install
If you see TypeScript compilation errors:The project requires TypeScript ~5.6.2.
Hot reload not working
Hot reload not working
If changes aren’t reflected automatically:
- Check that you’re editing files inside the
src/directory - Restart the dev server:
Ctrl+Cthennpm run dev - Clear browser cache and hard reload (
Ctrl+Shift+R) - If using Docker, ensure volumes are mounted correctly
Out of memory errors
Out of memory errors
The WASM CSG operations can be memory-intensive:
Next Steps
Docker Setup
Run Gridfinity Builder in a containerized environment
Building for Production
Create optimized production builds
