This guide explains how to link local dependencies into a Lime CRM solution.
Info
Linking local dependencies is super helpful when you're developing your solution,. It's useful when doing end-to-end testing, debugging, and before making commits / PRs / releases.
The diagram below presents a convenient setup for most developers in Lime CRM:

The following projects are involved:
solution-kulfon(basically any solution created by runninglime-project new solution)lime-crmlime-corelime-webclientlime-crm-componentslime-web-components
Prerequisite¶
Ensure all projects are cloned and installed according to instructions which can be found in relevant repositories.
Setup¶
Setup consists of few steps that depend on each other. Linking all local dependencies is optional and you can skip linking any of npm module / Python package. In such case you need to do this consequently, so if you decide to not link e.g. local lime-web-components then you should not attach this module in lime-crm-components and lime-webclient, to have consistent setup. Also you can skip steps 4 and 5 if you are not using any "solution" and want to run lime-webclient directly.
1. Linking lime-web-components to lime-crm-components¶
- Navigate to
lime-web-components/packages/lime-web-componentsfolder. - Build the project by running
npm run build. -
Run
npm link. This will register locallime-web-componentsin globalnode_modules. You can confirm that by runningnpm list --global. It should look similarly to:/home/kulfon/.nvm/versions/node/v16.10.0/lib ├── @limetech/[email protected] -> ./../../../../../Projects/src/lime-web-components/packages/lime-web-components ├── [email protected] ├── [email protected] └── ... -
Navigate to
lime-crm-componentsroot folder. - Run
npm link @limetech/lime-web-components. - Done! Now local
lime-crm-componentsshould use locallime-web-components! ✨
2. Linking lime-web-components and lime-crm-components to lime-webclient¶
Assuming lime-web-components is already installed in global node_modules:
1. Navigate to lime-crm-components root folder.
2. Run npm link. This will register local lime-crm-components in global node_modules. You can confirm that by running npm list --global.
/home/kulfon/.nvm/versions/node/v16.10.0/lib
├── @limetech/[email protected] -> ./../../../../../Projects/src/lime-web-components/packages/lime-web-components
├── @lundalogik/[email protected] -> ./../../../../../Projects/src/lime-crm-components
├── [email protected]
├── [email protected]
└── ...
- Navigate to
lime-webclient/frontend/webclient. - Run
npm link @limetech/lime-web-components @lundalogik/lime-crm-components. - Navigate to
lime-webclient/frontend/admin. - Run again
npm link @limetech/lime-web-components @lundalogik/lime-crm-components. - Done! Now
webclientandadminmodules in locallime-webclientproject should use locallime-crm-componentsandlime-web-components! ✨
3. Linking lime-core to lime-webclient¶
- Navigate to
lime-webclientroot folder. - Open
pyproject.toml. - Modify line with
lime-coredependency definition from something likelime-core = {version = "^23.233.0", allow-prereleases = true}tolime-core = {path = "<path_to_local_lime-core>"}. - Save the file.
- Run
poetry install. - Done! Now
lime-webclientshould use local version oflime-core! ✨
4. Linking lime-core and lime-webclient to lime-crm¶
- Navigate to
lime-crmroot folder. - Open
pyproject.toml. - Modify line with
lime-coredependency definition from something likelime-core = {version = "^23.233.0", allow-prereleases = true}tolime-core = {path = "<path_to_local_lime-core>"}. - Modify line with
lime-webclientdependency definition from something likelime-webclient = ">=46.360.2,<47"tolime-webclient = {path = "<path_to_local_lime-webclient>"}. - Save the file.
- Run
poetry install. - Done! Now
lime-crmshould use local versions oflime-coreandlime-webclient! ✨
5. Linking lime-crm to solution-kulfon¶
- Navigate to
solution-kulfonroot folder. - Open
pyproject.toml. - Modify line with
lime-crmdependency definition from something likelime-crm = "^2.322.0"tolime-crm = {path = "<path to local">}. - Save the file.
- Run
poetry install. - Done! Now
solution-kulfonshould use local version oflime-crm! ✨
Running solution¶
Using full setup with solution-kulfon¶
- Navigate to
lime-crm-componentsroot folder and runnpm start. - In separate terminal navigate to
lime-webclient/frontend/webclientand runnpm start. - In separate terminal navigate to
lime-webclient/frontend/adminand runnpm start(if you need the access to the admin page). - In separate terminal navigate to
solution-kulfonand runFLASK_ENV=development poetry run flask runor run the server in the debugging mode in VSCode.
Using lime-webclient only¶
- Navigate to
lime-crm-componentsroot folder and runnpm start. - In separate terminal navigate to
lime-webclient/frontend/webclientand runnpm start. - In separate terminal navigate to
lime-webclient/frontend/adminand runnpm start(if you need the access to the admin page). - In separate terminal navigate to
lime-webclientand runpoetry run flask runor run the server in the debugging mode in VSCode.
General notes¶
pyproject.tomlis versioned file, so make sure to not push changes that relate to linking local Python dependencies.- Alternative way of linking local Python dependencies is running
poetry add <path_to_dependency>. If you already have the remote package in your venv-folder you might have to remove it manually first. - Running
npm installafter linking local JavaScript dependencies will reset them according to a project'spackage.json, so you will need to link them to a dependant project again.