咨询Cumulocity本地开发中启用同目录应用检测的配置参数
Hey there, let's break down how to get that parent directory scanning behavior back in your Cumulocity local development setup!
The Background
As you noted, older versions of cumulocity-tools (like 2.0.26) automatically scanned all sibling apps in the same parent folder when running c8y server, letting your apps reference plugins stored in hidden "plugin container" apps. Newer versions changed this default behavior, but there's a simple config fix to re-enable it.
The Solution: Use the scanParentDirectory Config
Yes, there is a configuration parameter to reactivate the parent directory scanning:
- Command-line quick fix: When starting your local server, add the
--scanParentDirflag directly:c8y server --scanParentDir - Persistent config: To make this the default for your project, add the setting to either:
- Your project's
package.jsonunder thecumulocitysection:{ "cumulocity": { "server": { "scanParentDirectory": true } } } - A
.c8yrcfile in your project root (create it if it doesn't exist):{ "server": { "scanParentDirectory": true } }
- Your project's
Extra Checks
Just to cover all bases:
- Make sure your hidden plugin app has
"hidden": trueset in its ownpackage.json— this marks it as a plugin container that other apps can reference. - After setting the config, restart your
c8y serverinstance to apply the changes.
内容的提问来源于stack exchange,提问作者Meykel
相关产品推荐
相关产品推荐

