denoland/denobyexample

Import map diagnostics warning

hashrock opened this issue · 5 comments

deno task test says this:

Import map diagnostics:
  - Invalid top-level key "tasks". Only "imports" and "scopes" can be present.
  - Invalid top-level key "compilerOptions". Only "imports" and "scopes" can be present.

looks like importing www/deno.json from deno.jsonc caused this warning:

"importMap": "./www/deno.json",

Yeah, there isn't proper inheritance for deno.json yet and fresh is kind of twisting our arm here. We're also two minor versions behind on Fresh but I haven't had the time to look into why an upgrade messes everything up.

Ok I'll look into fresh upgrade.
Also I think it might be better to manage import maps separately because root deno.jsonc may not need some dependencies in fresh app like preact.

Thanks for looking into it. I think separating the import maps could work, but then we couldn't run deno task www from the root if we didn't specify exactly the same dependencies.

I thought so too, but when I tried it, it worked. It seems that deno.json in the same directory as the main entry point is looked up first.

https://deno.com/blog/v1.18#auto-discovery-of-the-config-file

update:
VSCode complains about this :(

FYI: Regarding the issue where the design collapses due to fresh upgrade. The problem seems to be that the twind plugin is not loaded in dev.ts immediately after the upgrade. main.ts works fine. marvinh is aware of the problem and I think it will be fixed eventually.