Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues with downloading the functions #5

Open
samrocksc opened this issue Jul 3, 2021 · 3 comments
Open

Issues with downloading the functions #5

samrocksc opened this issue Jul 3, 2021 · 3 comments

Comments

@samrocksc
Copy link

samrocksc commented Jul 3, 2021

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

> [email protected] 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/[email protected]/deps.ts
Download https://jspm.dev/npm:tslib@1!cjs
Download https://jspm.dev/npm:@aws-crypto/[email protected]!cjs
Download https://jspm.dev/npm:[email protected]!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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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/[email protected]/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

@hicksy
Copy link
Collaborator

hicksy commented Jul 5, 2021

Hi thanks @samrocksc, I've had a bit of time away while we moved house, so fallen behind on the Deno updates. Will take a look at what needs changing to support 1.11.4

@hicksy
Copy link
Collaborator

hicksy commented Jul 5, 2021

OK, I've dug into this. I'm afraid for now 1.10.x is the highest supported Deno version. I've got a version ready that's updated our std lib deps to 0.100.0, but the package we're currently using for the AWS SDK - https://deno.land/x/[email protected] - has dependencies to 0.97, which appear to have some breaking changes in 1.11.x

Will keep an eye on it, and update when possible 👍

@tbeseda
Copy link
Member

tbeseda commented Sep 23, 2021

Just leaving a note here as I was experimenting with Deno version compatibility. In case others are testing other versions.

I tried with:
v1.10.3 👍
v1.11.5 + 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants