denoland / fresh

The next-gen web framework.
https://fresh.deno.dev
MIT License
12.18k stars 623 forks source link

islands adapt deno workspace #2615

Open Octo8080X opened 1 month ago

Octo8080X commented 1 month ago

If deno workspace is used, islands will not function.

For example, the following error is shown.

Error: Build failed with 1 error:
components/Button.tsx:2:27: ERROR: [plugin: deno-resolver] specifier was a bare specifier, but was not remapped to anything by importMap.
    at failureErrorWithLog (https://deno.land/x/esbuild@v0.20.2/mod.js:1626:15)
    at https://deno.land/x/esbuild@v0.20.2/mod.js:1034:25
    at runOnEndCallbacks (https://deno.land/x/esbuild@v0.20.2/mod.js:1461:45)
    at buildResponseToResult (https://deno.land/x/esbuild@v0.20.2/mod.js:1032:7)
    at https://deno.land/x/esbuild@v0.20.2/mod.js:1061:16
    at responseCallbacks.<computed> (https://deno.land/x/esbuild@v0.20.2/mod.js:679:9)
    at handleIncomingPacket (https://deno.land/x/esbuild@v0.20.2/mod.js:739:9)
    at readFromStdout (https://deno.land/x/esbuild@v0.20.2/mod.js:655:7)
    at https://deno.land/x/esbuild@v0.20.2/mod.js:1974:11
    at eventLoopTick (ext:core/01_core.js:168:7) {
  errors: [Getter/Setter],
  warnings: [Getter/Setter]
}

In the case of building multiple fresh applications in a single repository, the availability of this feature should be very useful.

We would like to be able to use it.

neehhaa06 commented 1 month ago

Hello @Octo8080X :)

fix: #2615

Please follow this step.

Update **importMap.json** with correct mappings.

Add **importMap** to **deno.json.**

Verify imports in your files.

Use importMap in Deno commands.

Update Deno to the latest version.
hoomp3 commented 2 weeks ago

is there actually a way to fix this? those steps do not work.