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

[TypeError: adapter is not a function] - fetching content in Contenful on a Server Component #43120

Closed
1 task done
addsac opened this issue Nov 19, 2022 · 2 comments
Closed
1 task done
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation Runtime Related to Node.js or Edge Runtime with Next.js.

Comments

@addsac
Copy link

addsac commented Nov 19, 2022

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
Platform: darwin
Arch: x64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:54 PDT 2022; root:xnu-8792.41.9~2/RELEASE_X86_64
Binaries:
Node: 16.16.0
npm: 8.11.0
Yarn: 1.22.19
pnpm: N/A
Relevant packages:
next: 13.0.5-canary.2
eslint-config-next: 13.0.2
react: 18.2.0
react-dom: 18.2.0

What browser are you using? (if relevant)

Chrome 107.0.5304.110∑

How are you deploying your application? (if relevant)

still in local

Describe the Bug

When I try to fetch content in Contentful on a fresh Next.js 13 application, i get this error:
[TypeError: adapter is not a function]

The files I use to describe the error are:

  • app/components/BlogPreview.jsx
  • util/contentfulBlogPosts.js

Expected Behavior

I should be able to get the results of the api call

Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster

https://github.com/addsac/PegasoDigitalStudio

To Reproduce

Clone the rep, run on terminal: "npm run dev", open localhost:3000.

@addsac addsac added the bug Issue was opened via the bug report template. label Nov 19, 2022
@balazsorban44
Copy link
Member

balazsorban44 commented Nov 21, 2022

I cannot run the reproduction as it requires an access token, as well as there are unrelated module import issues:
image

Please fix the reproduction by removing unnecessary code that does not contribute to the issue and removing requirements for auth, so we can investigate.

Also, not clear what this means:

I should be able to get the results of the api call

The reproduction only has a dummy api/hello endpoint that isn't referenced anywhere

@balazsorban44 balazsorban44 added please add a complete reproduction The issue lacks information for further investigation area: app App directory (appDir: true) Runtime Related to Node.js or Edge Runtime with Next.js. labels Nov 21, 2022
@addsac addsac closed this as completed Nov 24, 2022
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. please add a complete reproduction The issue lacks information for further investigation Runtime Related to Node.js or Edge Runtime with Next.js.
Projects
None yet
Development

No branches or pull requests

2 participants