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

realFetch.call is not a function when using this lib in Lambda #87

Closed
pjain11 opened this issue May 19, 2022 · 3 comments
Closed

realFetch.call is not a function when using this lib in Lambda #87

pjain11 opened this issue May 19, 2022 · 3 comments
Assignees

Comments

@pjain11
Copy link

pjain11 commented May 19, 2022

This seems like associated with isomorphic-fetch v 3.x matthew-andrews/isomorphic-fetch#194

@chronark
Copy link
Contributor

Thanks, I'll try to figure this out tomorrow

@chronark chronark self-assigned this May 20, 2022
@chronark
Copy link
Contributor

chronark commented May 20, 2022

Hey @pjain11
I tried recreating this in a node16 lambda on aws but it worked as expected

const { Redis } = require("@upstash/redis/with-fetch"); // v1.4.0

exports.handler = async (event, context) => {
  let response;
  try {
    const redis = Redis.fromEnv();

    const set = await redis.set("node", '{"hello":"world"}');

    const get = await redis.get("node");

    response = {
      "statusCode": 200,
      "body": JSON.stringify({
        set,
        get,
      }),
    };
  } catch (err) {
    console.log(err);
    return err;
  }

  return response;
};

Can you provide a small reproduction, so I can understand what's going on?

@chronark
Copy link
Contributor

Closing this, please reopen if you encounter it again

@chronark chronark closed this as not planned Won't fix, can't repro, duplicate, stale Jul 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants