You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
update the import for domhandler in formatted-text.tsx from import { Element } from "domhandler/lib/node" to import { Element } from "domhandler"
renamed env .env.example to just .env
Additional context
Ran into this error message on both local and Vercel build attempts:
Local Error :
❯ npm run build
> example-marketing@1.5.0 build
> next build && next export
info - Loaded env from /Users/boxia/Projects/drupal-nextjs-marketing-site/.env
info - Linting and checking validity of types
info - Creating an optimized production build
info - Compiled successfully
info - Collecting page data ..[next-drupal][error]: Error: Failed to fetch JSON:API index at http://localhost:8080/es/jsonapi - fetch failed
at /Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next-drupal/dist/index.js:2053:28
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)
at async Promise.all (index 0)
at async getStaticPaths (/Users/boxia/Projects/drupal-nextjs-marketing-site/.next/server/pages/[[...slug]].js:121:16)
at async buildStaticPaths (/Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/build/utils.js:592:33)
at async /Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/build/utils.js:886:115
at async Span.traceAsyncFn (/Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/trace/trace.js:79:20)
TypeError: Cannot read properties of undefined (reading 'links')
at /Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next-drupal/dist/index.js:2075:42
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Promise.all (index 1)
at async Promise.all (index 0)
at async getStaticPaths (/Users/boxia/Projects/drupal-nextjs-marketing-site/.next/server/pages/[[...slug]].js:121:16)
at async buildStaticPaths (/Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/build/utils.js:592:33)
at async /Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/build/utils.js:886:115
at async Span.traceAsyncFn (/Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/trace/trace.js:79:20)
> Build error occurred
Error: Failed to collect page data for /[[...slug]]
at /Users/boxia/Projects/drupal-nextjs-marketing-site/node_modules/next/dist/build/utils.js:916:15
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
type: 'Error'
}
Package
example-marketing
Ask the question
I am unable to build locally or on Vercel this example. Really appreciate any advice as I have little frontend experience.
There are other fixes I had to do up to this point, not sure if they are right.
next.config.js
images field to an arrayimages: { domains: process.env.NEXT_IMAGE_DOMAIN ? [process.env.NEXT_IMAGE_DOMAIN] : [], },
update the import for domhandler in
formatted-text.tsx
fromimport { Element } from "domhandler/lib/node"
toimport { Element } from "domhandler"
renamed env
.env.example
to just.env
Additional context
Ran into this error message on both local and Vercel build attempts:
Local Error :
Vercel Error :
Vercel App
Github Repo
The text was updated successfully, but these errors were encountered: