Reading the repo
Opening the box…
Reading the repo
Opening the box…
How to install on Linux
Visualize Your Ideas With Code
Saved setup from 9 h ago
Will it work on Linux?
Then run bash setup.sh. It stops at the first error and is safe to run again. Servers and tests aren't started; it lists them at the end. Read it first.
git clone https://github.com/motion-canvas/motion-canvas.git cd motion-canvas
Node.js 20
# needs nvm: https://github.com/nvm-sh/nvm nvm install 20
npm ci
It can be useful to install a local version of Motion Canvas in a standalone project. For example, when you want to use your own fork with some custom-made features to create your animations.
Let's assume the following project structure:
projects/
├── motion-canvas/ <- your local monorepo
└── my-project/ <- a bootstrapped project
└── package.json
You can link the local packages from the monorepo by updating the package.json
of your project. Simply replace the version with a file: followed by a
relative path to the package you want to link:
"dependencies": {
- "@motion-canvas/core": "^3.11.0",
+ "@motion-canvas/core": "file:../motion-canvas/packages/core",
// ...
},
If you're linking the ui package, you'll also need to modify vite.config.ts
to allow vite to load external files:
import {defineConfig} from 'vite';
import motionCanvas from '@motion-canvas/vite-plugin';
export default defineConfig({
server: {
fs: {
// let it load external files
strict: false,
},
},
plugins: [motionCanvas()],
});
This is necessary because the editor styles are loaded using the /@fs/ prefix
and since the linked ui package is outside the project, vite needs permission
to access it.
Then run npm install in to apply the changes and that's it.
You can use the same technique to test out any custom package you're working on.
No reports for Linux yet.
GitManual AI Agent reads the 6 key files and writes a step-by-step guide for Linux. Once written, it's saved for everyone.