Skip to content

Issues with downloading the functions #5

Open
@samrocksc

Description

@samrocksc

Describe the issue
The async get function does not finish processing. Using the repo here: https://github.com/hicksy/deno-arc-example-login-flow, and also multiple other repos I have tried, there is an issue with the functions package.

I attempted to:

  • downgrade to node 12(unsuccessful)
  • downgrade to deno 1.10(works as expected)

All of which resulted in the same behavior, i also tried just running the package by itself, and with the --unstable flag, and similar results

Steps to reproduce
Steps to reproduce the behavior:

  1. download the example repo in these docs: https://github.com/hicksy/deno-arc-example-login-flow
  2. npm i
  3. visit localhost:3333
  4. observe error in logs

Expected behavior
The login workflow and ability to enter a password

Screenshots
n/a

Desktop
Please complete the following information (if appropriate):

  • Ubuntu 20
  • Chrome
  • deno: 1.11.4

Additional context

Base example recommended from the docs with architect version.

➜  deno-arc-example-login-flow git:(main) ✗ npm run start

> deno-arc-example-login-flow@1.0.0 start /home/sam/GitHub/personal/deno-arc-example-login-flow
> arc sandbox

         App ⌁ loginflow
      Region ⌁ us-west-2
     Profile ⌁ default
     Version ⌁ Architect 8.7.4
         cwd ⌁ /home/sam/GitHub/personal/deno-arc-example-login-flow

✓ Sandbox Found Architect project manifest: app.arc
✓ Sandbox No testing environment variables found
✓ Sandbox Started service discovery emulator
✓ Sandbox @http server started
✓ Sandbox Project files hydrated into functions
✓ Sandbox Available @http (HTTP API mode / Lambda proxy v2.0 format) routes
    get / ................................. src/http/get-index
    get /logout ........................... src/http/get-logout
    get /protected ........................ src/http/get-protected
   post /login ............................ src/http/post-login

    http://localhost:3333

✓ Sandbox Started in 24ms
❤︎ Local environment ready!

Deno verison:

➜  deno-arc-example-login-flow git:(main) ✗ deno --version
deno 1.11.4+ed16f43 (canary, x86_64-unknown-linux-gnu)
v8 9.1.269.35
typescript 4.3.2

Error Logs:

Download https://deno.land/x/rhum@v1.1.9/deps.ts
Download https://jspm.dev/npm:tslib@1!cjs
Download https://jspm.dev/npm:@aws-crypto/crc32@1.0.0!cjs
Download https://jspm.dev/npm:tslib@1.14.1!cjs
Check file:///home/sam/GitHub/personal/deno-arc-example-login-flow/src/http/get-index/index.js
error: Uncaught (in promise) TypeError: TS2345 [ERROR]: Argument of type 'FsWatcher' is not assignable to parameter of type 'AsyncIterableIterator<FsEvent>'.
  Property 'next' is missing in type 'FsWatcher' but required in type 'AsyncIterableIterator<FsEvent>'.
  asyncIterableIteratorToCallback<Deno.FsEvent>(iterator, (val, done) => {
                                                ~~~~~~~~
    at https://deno.land/std@0.89.0/node/_fs/_fs_watch.ts:91:49

    'next' is declared here.
        next(...args: [] | [TNext]): Promise<IteratorResult<T, TReturn>>;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at asset:///lib.es2018.asynciterable.d.ts:34:5

TS7022 [ERROR]: 'arch[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
arch[Symbol.toPrimitive] = (): string => arch();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:92:1

TS7022 [ERROR]: 'endianness[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
endianness[Symbol.toPrimitive] = (): string => endianness();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:93:1

TS7022 [ERROR]: 'freemem[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
freemem[Symbol.toPrimitive] = (): number => freemem();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:94:1

TS7022 [ERROR]: 'homedir[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
homedir[Symbol.toPrimitive] = (): string | null => homedir();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:95:1

TS7022 [ERROR]: 'hostname[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
hostname[Symbol.toPrimitive] = (): string | null => hostname();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:96:1

TS7022 [ERROR]: 'platform[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
platform[Symbol.toPrimitive] = (): string => platform();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:97:1

TS7022 [ERROR]: 'release[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
release[Symbol.toPrimitive] = (): string => release();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:98:1

TS7022 [ERROR]: 'totalmem[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
totalmem[Symbol.toPrimitive] = (): number => totalmem();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:99:1

TS7022 [ERROR]: 'type[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
type[Symbol.toPrimitive] = (): string => type();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:100:1

TS7022 [ERROR]: 'uptime[Symbol.toPrimitive]' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.
uptime[Symbol.toPrimitive] = (): number => uptime();
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/std@0.89.0/node/os.ts:101:1

Found 11 errors.
    let mod = await import(`file://${path}`);
              ^
    at async file:///home/sam/.nvm/versions/node/v14.17.1/lib/node_modules/@architect/architect/node_modules/@architect/sandbox/src/invoke-lambda/runtimes/deno.js:25:15

I attempted to downgrade my node version to 12 because the last message looked suspicious:

Found 11 errors.
    let mod = await import(`file://${path}`);
              ^
    at async file:///home/sam/.nvm/versions/node/v12.20.1/lib/node_modules/@architect/architect/node_modules/@architect/sandbox/src/invoke-lambda/runtimes/deno.js:25:15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions