aleph.js: Uncaught TypeError in Getting Started guide

Hello Aleph.js team ๐Ÿ‘‹. I was recently updating my blog post about Aleph and found that I was getting an error when following along with the current Getting Started guide. All three aleph commands, dev, start, and build result in the same error.

Commands entered:

deno install --unstable -A -f -n aleph https://deno.land/x/aleph@v0.2.28/cli.ts
export PATH="/Users/ajcwebdev/.deno/bin:$PATH"
aleph init hello
cd hello
aleph dev

Error output:

Check https://deno.land/x/aleph@v0.2.28/cli/dev.ts

error: Uncaught (in promise) TypeError: TS2345 [ERROR]: Argument of type 'TransformerFactory<SourceFile>' is not assignable to parameter of type 'TransformerFactory<SourceFile> | CustomTransformerFactory'.
  Type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").TransformerFactory<import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").SourceFile>' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").TransformerFactory<import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").SourceFile>'.
    Types of parameters 'context' and 'context' are incompatible.
      Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").TransformationContext' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").TransformationContext'.
        The types of 'factory.createTypeParameterDeclaration(...).parent' are incompatible between these types.
          Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").DeclarationWithTypeParameterChildren | import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").InferTypeNode' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").DeclarationWithTypeParameterChildren | import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").InferTypeNode'.
            Type 'JSDocTemplateTag' is not assignable to type 'DeclarationWithTypeParameterChildren | InferTypeNode'.
              Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").JSDocTemplateTag' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").JSDocTemplateTag'.
                Types of property 'parent' are incompatible.
                  Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").JSDoc | import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").JSDocTypeLiteral' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").JSDoc | import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").JSDocTypeLiteral'.
                    Type 'JSDoc' is not assignable to type 'JSDoc | JSDocTypeLiteral'.
                      Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").JSDoc' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").JSDoc'.
                        Types of property 'parent' are incompatible.
                          Type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").HasJSDoc' is not assignable to type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").HasJSDoc'.
                            Type 'ImportEqualsDeclaration' is not assignable to type 'HasJSDoc'.
                              Property 'isTypeOnly' is missing in type 'import("https://cdn.esm.sh/v41/typescript@4.1.2/lib/typescript.d.ts").ImportEqualsDeclaration' but required in type 'import("https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts").ImportEqualsDeclaration'.
    if (reactRefresh) transformers.before!.push(reactRefreshTS())
                                                ~~~~~~~~~~~~~~~~
    at https://deno.land/x/aleph@v0.2.28/tsc/compile.ts:28:49

    'isTypeOnly' is declared here.
            readonly isTypeOnly: boolean;
                     ~~~~~~~~~~
        at https://cdn.esm.sh/v41/typescript@4.2.4/lib/typescript.d.ts:1601:18
    const { default: cmd } = await import(`./cli/${command}.ts`)
                             ^
    at async main (https://deno.land/x/aleph@v0.2.28/cli.ts:163:30)

Aleph version

aleph.js v0.2.28

Deno version

deno 1.8.0

deno info

DENO_DIR location: "/Users/ajcwebdev/Library/Caches/deno"
Remote modules cache: "/Users/ajcwebdev/Library/Caches/deno/deps"
TypeScript compiler cache: "/Users/ajcwebdev/Library/Caches/deno/gen"

My system info

System Version: macOS 11.3 (20E232)
Kernel Version: Darwin 20.4.0
Boot Volume: Macintosh HD

Hopefully thatโ€™s helpful, let me know if you need other system info or anything like that.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 23 (7 by maintainers)

Most upvoted comments

Documentation is way behind on things

@thesabbir I would like to point out that the doc is purposely not updated with alpha stuff, well, because its alpha and super unstable compared to 0.2.28.

@scally Awesome!

Cool, thanks for the info @shadowtime2000! ๐Ÿ‘

Havenโ€™t tried it yet but it looks like there is in fact a dvm.

@ajcwebdev You would just downgrade to Deno 1.6.3. There isnโ€™t any tool afaik that can do something like nvm, you would just have to downgrade to Deno 1.6.3 if you want to use the latest somewhat stable Aleph version.

I think most people who are going to be finding the getting started guide are going to be on a recent version of Deno and are going to assume that they can just run the commands and get started. If this is not the case there should be more thorough instructions to get your dev environment setup.

Documentation is way behind on things. @scally good job!

I found a potential fix for deno 1.10 / aleph 0.3.0-alpha.33 :

I reinstalled aleph 0.3.0-alpha.33 with an additional dummy --location flag, like this:

deno install --location=http://localhost --unstable -A -f -n aleph https://deno.land/x/aleph@v0.3.0-alpha.33/cli.ts

And it finally worked โ€“ localStorage is finally operational.

It seems then that this is an issue with esm.sh then, though i donโ€™t know for sure (cc @ije)

PS: you can also join the aleph discord server for help, but I am also in the deno discord server if you need help with stuff