lumeland / lume

🔥 Static site generator for Deno 🦕
https://lume.land
MIT License
1.85k stars 85 forks source link

Lume fails to import nonexisting cms module #616

Closed scarf005 closed 2 months ago

scarf005 commented 3 months ago

Version

2.2.1

Platform

linux

What steps will reproduce the bug?

https://github.com/lumeland/lume/assets/54838975/3797ecda-a412-4f79-a98e-722a7f86f1d0

initialize lume with default options. or:

deno cache https://deno.land/x/lume@v2.2.1/cms/adapters/lume.ts

How often does it reproduce? Is there a required condition?

always happens.

What is the expected behavior?

  1. lume shouldn't require CMS when it's not used.
  2. lume shouldn't import module that does not exist.

What do you see instead?

Module not found "https://deno.land/x/lume@v2.2.1/cms/adapters/lume.ts"

output.log

Additional information

No response

oscarotero commented 3 months ago

Yes, sorry for the trouble. This is a breaking change in Lume 2.2.0, that changed the way to import LumeCMS. It's explained here: https://lume.land/blog/posts/lume-2.2.0-luisa-villalta/#cms-import-changes

The solution is to add the lume/cms/ entry to your import maps:

{
  "imports": {
    "lume/": "https://deno.land/x/lume@v2.2.1/",
    "lume/cms/": "https://cdn.jsdelivr.net/gh/lumeland/cms@0.5.1/"
  }
}