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

No fetch handler error when creating a AWS instance #1067

Closed
robertomodorcea opened this issue Jul 3, 2023 · 2 comments
Closed

No fetch handler error when creating a AWS instance #1067

robertomodorcea opened this issue Jul 3, 2023 · 2 comments

Comments

@robertomodorcea
Copy link

What is the location of your example repository?

No response

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

2023.4.6

What version of Remix are you using?

1.17

Steps to Reproduce

FetchError [ERR_NO_HANDLER]: No fetch handler defined and no upstream to proxy to specified.
Make sure you're exporting a default object containing a fetch function property.

I get this error when i try to create a aws.S3() instance. The code looks like this:

const s3 = new aws.S3({
   accessKeyId: 'process.env.ACCESS_KEY_ID',
   secretAccessKey:
     'process.env.SECRET_ACCESS_KEY',
   region: 'auto',
   signatureVersion: 'v4',
   endpoint:
     'process.env.ENDPOINT',
 });

Expected Behavior

I expect it to work without any problems, just like it works in a blank Remix project.

Actual Behavior

It triggers the error: FetchError [ERR_NO_HANDLER]: No fetch handler defined and no upstream to proxy to specified.
Make sure you're exporting a default object containing a fetch function property.

@wizardlyhel
Copy link
Contributor

Not sure if it is related but I think there may be missing functions that aws-sdk expects.
Try @aws-sdk/client-s3 package instead?

Reference: remix-run/remix#2800

@blittle
Copy link
Contributor

blittle commented Jun 21, 2024

Closing due to lack of response. Please re-open if still an issue.

@blittle blittle closed this as completed Jun 21, 2024
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

3 participants