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

Module build failed: UnhandledSchemeError when using gatsby function #38481

Closed
2 tasks done
Talaxy009 opened this issue Aug 25, 2023 · 3 comments · Fixed by #38489
Closed
2 tasks done

Module build failed: UnhandledSchemeError when using gatsby function #38481

Talaxy009 opened this issue Aug 25, 2023 · 3 comments · Fixed by #38489
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby

Comments

@Talaxy009
Copy link
Contributor

Talaxy009 commented Aug 25, 2023

Preliminary Checks

Description

I'm trying to write a gatsby function, but it seems like webpack can't compile it.

image
image

I have create a repo which is base on hello-world starter and add a tiny function in it to reproduce this issue, you can find the link below.

Reproduction Link

https://github.com/Talaxy009/gatsby-function-issue

Steps to Reproduce

  1. Clone Reproduction Link
  2. Install dependencies
  3. Run gatsby develop
  4. Visit http://localhost:8000/api/hello
  5. You should be able to see the error from the browser and console

Expected Result

The /api/hello should return "hello"

Actual Result

The /api/hello return error message from webpack

Environment

System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor              
  Binaries:
    Node: 18.16.1 - ~\AppData\Local\Temp\xfs-98c1ccf6\node.CMD
    Yarn: 3.6.3 - ~\AppData\Local\Temp\xfs-98c1ccf6\yarn.CMD
    npm: 9.5.1 - D:\Program Files\nodejs\npm.CMD
  Languages:
    Python: 3.10.9
  Browsers:
    Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.54)
  npmPackages:
    gatsby: ^5.12.1 => 5.12.1

Config Flags

Nope

@Talaxy009 Talaxy009 added the type: bug An issue or pull request relating to a bug in Gatsby label Aug 25, 2023
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Aug 25, 2023
@pieh pieh added status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Aug 28, 2023
@pieh
Copy link
Contributor

pieh commented Aug 28, 2023

Confirmed. #38489 is looking to fix this.

@pieh
Copy link
Contributor

pieh commented Aug 28, 2023

This should be fixed in gatsby@5.12.3

@Talaxy009
Copy link
Contributor Author

@pieh 5.12.3 works well, thanks for your work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: confirmed Issue with steps to reproduce the bug that’s been verified by at least one reviewer. type: bug An issue or pull request relating to a bug in Gatsby
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants