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

Serverless function in Gatsby site throwing error and not returning data locally #38913

Open
2 tasks done
jarren15 opened this issue Mar 27, 2024 · 0 comments
Open
2 tasks done
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby

Comments

@jarren15
Copy link

Preliminary Checks

Description

I've created a serverless function in my Gatsby site as shown in the documentation, but it's throwing an error and not returning the data when accessed locally.

image

Reproduction Link

https://github.com/jarren15/dm_frontend

Steps to Reproduce

  1. Navigate to the serverless function endpoint in the local development environment.
  2. Attempt to fetch data using the serverless function.
  3. Note the error encountered or observe that the fetched data is not returned as expected.
    ...

Expected Result

When accessing the serverless function locally, it should successfully fetch the data and return it without any errors.

Actual Result

The serverless function is throwing an error and failing to return the fetched data when accessed locally.

Environment

System:
    OS: Windows 11 10.0.22631
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    npm: 10.2.1 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (122.0.2365.92)
  npmPackages:
    gatsby: ^5.13.3 => 5.13.3 
    gatsby-plugin-anchor-links: ^1.2.1 => 1.2.1 
    gatsby-plugin-image: ^3.13.1 => 3.13.1 
    gatsby-plugin-manifest: ^5.13.1 => 5.13.1 
    gatsby-plugin-postcss: ^6.13.1 => 6.13.1 
    gatsby-plugin-sanity-image: ^0.13.4 => 0.13.4 
    gatsby-plugin-sass: ^6.13.1 => 6.13.1 
    gatsby-plugin-sharp: ^5.13.1 => 5.13.1 
    gatsby-source-filesystem: ^5.13.1 => 5.13.1 
    gatsby-source-sanity: ^7.9.1 => 7.9.1 
    gatsby-source-wordpress: ^7.13.3 => 7.13.3 
    gatsby-transformer-sharp: ^5.13.1 => 5.13.1 
  npmGlobalPackages:
    gatsby-cli: 5.13.2

Config Flags

No response

@jarren15 jarren15 added the type: bug An issue or pull request relating to a bug in Gatsby label Mar 27, 2024
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

No branches or pull requests

1 participant