Node.js >= 18.0.0 DFX >= 0.10.0
Install from on-chain storage
curl -fsSL cli.mops.one/install.sh | sh
or install from npm registry
npm i -g ic-mops
Run this command in the root directory of your project (where is dfx.json placed)
mops init
Add mops as a packtool to your dfx.json
"defaults": {
"build": {
"packtool": "mops sources"
}
}
}
Use mops add to install a specific package and save it to mops.toml
mops add zipper
Now you can import installed packages in your Motoko code
import Rand "mo:/Zipper";