Next.js Discord

Discord Forum

Help me understand why the default template from contentfulcms fails to build

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
I am trying to use contentful cms marketing template and the vercel deployment option to host my demo app for testing. Here is the failing build log entries.

Build Failed

Command "NEXT_PUBLIC_BASE_URL="${NEXT_PUBLIC_BASE_URL:-https://$NEXT_PUBLIC_VERCEL_URL}" yarn build" exited with 1

Build Log

Detected Next.js version: 12.3.1
Running "NEXT_PUBLIC_BASE_URL="${NEXT_PUBLIC_BASE_URL:-https://$NEXT_PUBLIC_VERCEL_URL}" yarn build"
yarn run v1.22.19
$ next build
warn - Invalid next.config.js options detected:
- The value at .i18n has an unexpected property, localePath, which is not in the list of allowed properties (defaultLocale, domains, localeDetection, locales).

Failed to compile.
./src/components/features/card-leadership/card-leadership.tsx:88:32
Type error: Argument of type '{ fieldId: string; }' is not assignable to parameter of type '({ fieldId: string; manuallyTagged: boolean | undefined; } | { fieldId: string; manuallyTagged: boolean | undefined; assetId: string; }) & Pick<LivePreviewProps, "locale" | ... 1 more ... | "space">'.
Type '{ fieldId: string; }' is not assignable to type '{ fieldId: string; manuallyTagged: boolean | undefined; assetId: string; } & Pick<LivePreviewProps, "locale" | "environment" | "space">'.
Type '{ fieldId: string; }' is missing the following properties from type '{ fieldId: string; manuallyTagged: boolean | undefined; assetId: string; }': manuallyTagged, assetId
86 | >
87 | {avatar && (
88 | <div {...inspectorMode({ fieldId: 'avatar' })} className={classes.avatar}>
| ^
89 | <CtfAsset {...avatar} showDescription={false} />
90 | </div>
91 | )}
error Command failed with exit code 1.

--

I'm very new to these software and deployment stack(s).

While I am new I learn very quickly and can understand and follow technical directions.

Please tell me what I am doing wrong.

Thank you for your continued support.

Respectfully,
Graham
7x

4 Replies

Champagne D’Argent
My friend says it could be your environment
Barbary LionOP
I found a way to supress the type error in the build processs now that's gone. it still fails on compile. I'm lost
What i mean to say is I think I have fixed the, "The value at .i18n has an unexpected property, localePath, which is not in the list of allowed properties " error now the compile still fails
Failed to compile.
./src/components/features/card-leadership/card-leadership.tsx:88:32
Type error: Argument of type '{ fieldId: string; }' is not assignable to parameter of type '({ fieldId: string; manuallyTagged: boolean | undefined; } | { fieldId: string; manuallyTagged: boolean | undefined; assetId: string; }) & Pick<LivePreviewProps, "locale" | ... 1 more ... | "space">'.
Type '{ fieldId: string; }' is not assignable to type '{ fieldId: string; manuallyTagged: boolean | undefined; assetId: string; } & Pick<LivePreviewProps, "locale" | "environment" | "space">'.
Type '{ fieldId: string; }' is missing the following properties from type '{ fieldId: string; manuallyTagged: boolean | undefined; assetId: string; }': manuallyTagged, assetId
86 | >
87 | {avatar && (

88 | <div {...inspectorMode({ fieldId: 'avatar' })} className={classes.avatar}>

| ^
89 | <CtfAsset {...avatar} showDescription={false} />
90 | </div>
91 | )}
error Command failed with exit code 1.