How do I enable / install moc?

This only works for packages published to mops.

Try this to install from github:

mops add https://github.com/ZhenyaUsenko/motoko-hash-map#v7.0.0

and import like this

import Map "mo:motoko-hash-map/Map";

Also you can rename motoko-hash-map to hashmap in mops.toml to be able to import like this

import Map "mo:hashmap/Map";

If you rename package in mops.toml you need to run mops install to install the package with new name.

2 Likes