https://discord.cloudflare.com logo
Join Discord
Powered by
# functions
  • b

    bryan.

    02/01/2022, 8:22 PM
    another quick question -- if I bind a KV locally using wrangler, should I be able to see values that I
    put
    into the KV?
  • b

    bryan.

    02/01/2022, 8:22 PM
    I'm finding that the code runs fine after binding but the values do not end up in the KV when looking through the console
  • b

    bryan.

    02/01/2022, 8:24 PM
    Ah nvm -- I see that it creates local files for this
  • j

    James

    02/01/2022, 8:26 PM
    Ah yeah with
    wrangler2
    local dev, it creates and stores local files for that. 🙂
  • c

    Cоlе

    02/01/2022, 11:21 PM
    anyone have any ideas 😳 I've narrowed it down to make sure that
    env.ASSETS.fetch()
    is returning the error, and not the function, but I'm not sure how else to troubleshoot 🤔
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:22 PM
    https://github.com/cloudflare/wrangler2/issues/165 Is this the error you're seeing?
  • c

    Cоlе

    02/01/2022, 11:23 PM
    I don't think so. Wrangler seems to work fine, but I can't get an error on prod cuz pages.
  • c

    Cоlе

    02/01/2022, 11:23 PM
    I did see that post earlier. I'm using an absolute link, not sure if that matters
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:23 PM
    Yeah, sorry, that issue is tracking a discrepancy between Pages prod and wrangler.
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:23 PM
    If you send
    env.ASSETS.fetch(request)
    where request is the incoming unaltered request, does that work?
  • c

    Cоlе

    02/01/2022, 11:24 PM
    they do seem similar for sure
  • c

    Cоlе

    02/01/2022, 11:24 PM
    only difference is the 406, which might just be how it's coded
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:24 PM
    Yeah, I think we're needing the
    cf
    props or something weird.
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:25 PM
    If you can write up some minimal repro steps, please do file an issue on the wrangler2 repo and I can take a look/combine with that other one if it makes sense.
  • c

    Cоlе

    02/01/2022, 11:25 PM
    will do
  • g

    Greg Brimble | Cloudflare Pages

    02/01/2022, 11:26 PM
    Related, we've also got https://github.com/cloudflare/wrangler2/issues/232
  • c

    Cоlе

    02/01/2022, 11:27 PM
    I saw that one earlier as well 😆 sounds like the whole "fetch" thing is a lot of fun
  • b

    bryan.

    02/02/2022, 1:17 AM
    Is there a way to specify a different root dir/path for the functions directory? I'm deploying a monorepo setup so my frontend deploy directory is not the project root but I need to run all of my build commands from the root dir
  • b

    bryan.

    02/02/2022, 1:20 AM
    I'll try experimenting with creating a symlink to the nested functions directory in my root but was wondering if there's another way to go about this
  • e

    Erisa | Support Engineer

    02/02/2022, 1:23 AM
    Is that not covered by this option?
  • b

    bryan.

    02/02/2022, 1:24 AM
    I unfortunately wasn't able to get the build to work properly using my monorepo setup using that option 😦
  • p

    pencilflip

    02/02/2022, 7:09 AM
    Hey all, I'm using cloudflare functions for my cloudflare pages deployment, and am running into this error
  • p

    pencilflip

    02/02/2022, 7:09 AM
    basically it breaks the whole website...
  • p

    pencilflip

    02/02/2022, 7:09 AM
    I tried deleting the service from the workers tab. but still run into this intermittently
  • p

    pencilflip

    02/02/2022, 7:09 AM
    is there some cache i need to purge or something
  • c

    Cоlе

    02/02/2022, 7:20 AM
    Are you using any recursive calls inside your functions? It sounds like you might be hitting the time limit
  • c

    Cоlе

    02/02/2022, 7:21 AM
    I don't know if that's what triggers a 1102, but typically it's really really hard to hit the 50ms limit
  • c

    Cоlе

    02/02/2022, 7:23 AM
    Yea, unfortunately monorepos are a no-go for the time being. I've resorted to using submodules for my projects
  • c

    Cоlе

    02/02/2022, 7:24 AM
    That being said, they work really well
  • p

    pencilflip

    02/02/2022, 7:25 AM
    we have some API calls
1...717273...392Latest