Skip to content

Main Menu Not Found #98

@suzannealdrich

Description

@suzannealdrich

Hi there,

I'm running into this error:

Server Error
Error: Not Found

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Source
<unknown>
file:///Users/suzannealdrich/Documents/Sites/next-drupal/node_modules/next-drupal/dist/index.js (200:17)
processTicksAndRejections
node:internal/process/task_queues (96:5)
lib/get-menus.ts (6:29) @ async getMenus

  4 |   main: DrupalMenuLinkContent[]
  5 | }> {
> 6 |   const { tree: mainMenu } = await getMenu("main")
    |                             ^
  7 | 
  8 |   return {
  9 |     main: mainMenu,
Call Stack
async getStaticProps
pages/index.tsx (58:13)
async Object.renderToHTML
file:///Users/suzannealdrich/Documents/Sites/next-drupal/node_modules/next/dist/server/render.js (465:20)
async doRender
file:///Users/suzannealdrich/Documents/Sites/next-drupal/node_modules/next/dist/server/base-server.js (879:38)
async cacheEntry.responseCache.get.isManualRevalidate.isManualRevalidate
file:///Users/suzannealdrich/Documents/Sites/next-drupal/node_modules/next/dist/server/base-server.js (979:28)
async
file:///Users/suzannealdrich/Documents/Sites/next-drupal/node_modules/next/dist/server/response-cache.js (64:36)
Hide collapsed frames

On the Drupal side:

Type | page not found
-- | --
Thursday, February 17, 2022 - 22:22
next-user
https://dev-next-drupal-9.pantheonsite.io/jsonapi/menu_items/main
 
/jsonapi/menu_items/main
Warning

Type	page not found
Date	Thursday, February 17, 2022 - 22:22
User	[next-user](https://dev-next-drupal-9.pantheonsite.io/user/2)
Location	https://dev-next-drupal-9.pantheonsite.io/jsonapi/menu_items/main
Referrer	
Message	/jsonapi/menu_items/main
Severity	Warning

I've checked, and there is a main menu. This is a vanilla Drupal 9 install on Pantheon. I get these errors on localhost, and I also can't make my Next project build on Vercel due to this error.

I tried setting up CORS as recommended in issue #77, but that hasn't resolved my error.

Thanks for all your work on this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions