You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Lazybones无法使用缓存版本问题求助

Fixing "Cannot create a new project when the template isn’t locally cached or no version is specified" in Lazybones 0.8.3

Hey Madiha, let's break down why you're hitting this error and how to get your AEM project set up smoothly. First, let's recap the exact error you encountered:

Creating project from template aem-multimodule-project (latest) in ‘aemtraining’ (Offline mode – run with -v or –stacktrace to find out why)
Cannot create a new project when the template isn’t locally cached or no version is specified

What's causing this issue?

This error ties directly to the "Offline mode" notice in your output, and boils down to three key reasons:

  • Lazybones is running offline: Either your network connection failed, you accidentally enabled offline mode, or the tool couldn't reach the remote template repository and switched to offline automatically.
  • No local cache of the aem-multimodule-project template: Since you’re using this template for the first time (or never downloaded it before), there’s no copy stored on your machine to use in offline mode.
  • No template version specified: Without a version number, Lazybones tries to pull the latest template from the internet—which it can’t do when offline.

How to fix it

Here are actionable steps to resolve this:

  1. Force Lazybones to run online and download the template
    Make sure your network is working, then re-run the command with the --online flag to bypass offline mode:

    lazybones create --online aem-multimodule-project aemtraining
    

    This will let Lazybones connect to the template repository, download the latest aem-multimodule-project template, and create your project in the aemtraining folder.

  2. Manually cache the template if you’re stuck offline
    If you can’t access the internet, download the template zip file separately and place it in Lazybones’ local cache directory:

    • For Windows: C:\Users\<YourUsername>\.lazybones\templates
    • For macOS/Linux: ~/.lazybones/templates
      Once the zip is in place, you can either run the original command (it should detect the cached template) or specify the template version explicitly:
    lazybones create aem-multimodule-project <template-version> aemtraining
    
  3. Check your Lazybones configuration
    Double-check if your config file is forcing offline mode. Open ~/.lazybones/config.groovy (or the Windows equivalent) and ensure there’s no line that says offline = true. If there is, change it to false and save the file before trying again.

内容的提问来源于stack exchange,提问作者madiha fatma

火山引擎 最新活动