pluvial / svelte-adapter-deno

A SvelteKit adapter for Deno
https://svelte-adapter-deno.deno.dev/
MIT License
313 stars 14 forks source link

Error related to getIterator #15

Closed villisek closed 2 years ago

villisek commented 2 years ago

Hello,

I am currently facing an issue with the Svelte adapter for deno.

When running SvelteKit's build process, I don't get any error. However, whn running :

deno run  --allow-env --allow-read --allow-net --config tsconfig.deno.json build/index.js

I get this error :

Unsupported compiler options in "file:///[pathToMyProject]/tsconfig.deno.json".
  The following options were ignored:
    allowSyntheticDefaultImports
Check file:///[pathToMyProject]/build/index.js
error: TS2339 [ERROR]: Property 'getIterator' does not exist on type 'ReadableStream<R>'.
  return res.readable.getIterator();
                      ~~~~~~~~~~~
    at https://deno.land/std@0.69.0/async/pool.ts:45:23

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:100:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:105:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:116:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:200:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:225:5

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:391:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.105.0/node/events.ts:424:7

I used the tsconfig.deno.json provided with the package. The options I set in the svelte.config.js are the build path, the deps (I set it to "./deps.ts" as in the README, I also tried moving the example in the package to the build folder) and enabled procompression.

I can provide further information if necessary.

Thanks ;)

jpaquim commented 2 years ago

Hey @villisek! Thanks for opening the issue, I've been taking a look at this problem, and was only able to make progress using the --no-check flag when running Deno. I merged a couple of PRs, updated the documentation and added an example project, do check it out and see if you have more success when running it like that.

If you need any further help, go ahead and create a minimal repo based on the example, and I'll help with debugging what may be going wrong 😄

villisek commented 2 years ago

Hi,

Thanks! I'm take a look at it ASAP and keep you updated on the results.

villisek commented 2 years ago

Hey @villisek! Thanks for opening the issue, I've been taking a look at this problem, and was only able to make progress using the --no-check flag when running Deno. I merged a couple of PRs, updated the documentation and added an example project, do check it out and see if you have more success when running it like that.

This solves the issue! Thanks! Should I close the issue or leave it open as it's, if I understood correctly, only a workaround?

Thank you! Have a nice day.

jpaquim commented 2 years ago

I think we can close it, there's really not much we can do given that it's a problem upstream. I'll track the upstream Deno issues, see if there's any outcome to allow being more selective in what to typecheck or not, but without that ability, --no-check seems to be the only way to make it work correctly.